
! simplemind uses .smmx files for storing mind maps (text+assets)
   ! https://simplemind.eu/

! it's a zip file:
    test.smmx
      document/mindmap.xml  (tests/offline created mindmap/document/mindmap.xml)
      images/7cc794179eebf8ac8e38847d07d363e642cdbdc8.png

! test document: [[tests/offline created mindmap.smmx]]

! <meta> header
    <guid guid="FFC052A279954B0AA1228D4805AE2872"/>
    <title text="list layout subtree"/>
    [<images containsImages="True"/>]
    <style key="system.gray-scale"/>
    <auto-numbering style="disabled"/>
    <scrollstate zoom="100" x="271" y="333"/>
    <selection guid="Bv-OUkzi6EifEC9GfV1f-Q" type="node" id="1"/>
    <main-centraltheme id="0"/>
  </meta>
 
! document styles:
   <style key="system.soft-palette"/>
   <style key="system.colors-on-black-palette"/>    
   <style key="system.gray-scale"/>
   <style key="system.black-and-white"/>

! text uses carriage return (13, 0xd) line endings

! node positioning via x="640" y="480"
   ! absolute coordinates
   ! negative y is up (?)
      ! <text guid="Sq_5En0MKWsRaonGi-s9PQ" x="500.48" y="-302.45">

! nodes have ids and guids
   ! id="0"
   ! guid="Sq_5En0MKWsRaonGi-s9PQ"
      ! 22 chars
      ! lower- and uppercase letters, numbers, '-', '_'
      ! may start with a number
   ! parent="1"
      ! "-1" if no parent

! xml can contain multiple <mindmap> elements

! <main-centraltheme id="0"/>
   ! in <meta> area

! <topics>
   ! <topic id="0" parent="-1" guid="57r6qQ6ZPCXZjU2aT6BFPw" x="511.00" y="489.00" palette="1" colorinfo="1" text="offline created mindmap" textfmt="plain">
   ! <topic id="1" parent="0" guid="5541hNL_YQCLBDOaKrJemw" x="442.00" y="654.00" palette="2" colorinfo="2" text="hello" textfmt="plain"/>

! callout text boxes via <children><text><note textfmt="plain">..text..</note><style>
    <style callout="line"/>

! links to other documents via <topic><link></topic>
   ! <link cloudmapref="./projects/project overview.smmx" />
   ! <link urllink="F:\tmp\bla.txt"/>
   ! <link urllink="http://www.google.de"/>
      ! http://www.google.de

! list layout subtrees
    <topic id="2" parent="1" guid="IKLcGrYLlUqOalSHLm9vrg" x="619.00" y="729.00" layout="list" text="list header node" textfmt="plain"/>
    <topic id="3" parent="2" x="627.50" y="773.56" text="list item 1" textfmt="plain"/>
    <topic id="4" parent="2" x="628.00" y="818.12" text="list item 2" textfmt="plain"/>

! image callouts
   ! <meta><images containsImages="True"/></meta>
   ! image callouts via 
      <topic>
        <children>
          <image>
            <link/>
          </image>
        </children>
        <images>
          <image>
            <link/>
          </image>
        </images>
      </topic>

      ! the <image> and <link> elements occur twice with the exact same attributes
         <image guid="0XdeoV8J8EaLgiKLfF8Y0w" name="3d6d5f9bb409d574bce32895d14009ee82f96783" x="40.00" y="-56.39" scale="1.00" angle="0.00">
         <link urllink="cloud://../SimpleMind/Images/001.png"/>

! embedded images (shown within topic box)
    <topic>
      <embedded-image name="7cc794179eebf8ac8e38847d07d363e642cdbdc8" scale="1.875"/>
    </topic>

! icons
    ic8_48_roadworks       construction
    ic8_48_hammer          hammer
    ic8_48_information     info
    ic8_48_question        question
    ic8_48_ok              done
    ic8_48_delete          X
    ic8_48_finish_flag     goal
    ic8_48_red_flag        checkpoint red
    ic8_48_yellow_flag     checkpoint yellow
    ic8_48_green_flag      checkpoint green
    ic8_48_light_on        idea
    ic8_48_construction    deadend
    ic8_48_ladybird        bug
    ic8_48_attach          attachment
    ic8_48_tools           hammer and screwdriver
    ic8_48_favorite        star
    ic8_48_emoticon_heart  heart
    ic8_48_emoticon_happy  smiley
    ic8_48_emoticon_wink   wink
    ic8_48_emoticon_lol    laugh
    ic8_48_neutral         umpf
    ic8_48_emoticon_sad    frown
    ic8_48_emoticon_crying cry
    ic8_48_pencil          edit
    ic8_48_shopping_cart   shopping cart
    ic8_48_book_open       book
    ic8_48_phone           phone
    ic8_48_music           music
    ic8_48_youtube         video
    ic8_48_email           URL

    ! <topic id="15" parent="1" guid="GlRMzKvA3kKqqmQoa5lGwA" x="738.57" y="1231.43" icon="ic8_48_attach" text="attachment" textfmt="plain">
    ! note: icons are pixel images (not svgs)


! relations
   ! occurs after <topics> tree
   ! <relations>
       <relation guid="4jiVSrHpIEKGTK578BNFTw" source="2" target="3">
         <path>
           <custom-point x="-1.88" y="36.25"/>   <--  relative coordinate (does not change when both nodes are moved)
         </path>
       </relation>
     </relations>

! checkboxes
! progress bars
    ! manual
    ! rollup

! calendar dates
    <topic id="3" parent="0" guid="QAe4hiO8dEa37JFdEh9E0Q" x="922.22" y="901.11" date="24-12-2020" text="xmas" textfmt="plain"/>

+ parser
   x extract zip to tmp dir
   + use libzip later on (write plugin)
   + parse XML
   + build node list
      + attribs:
         + id
         + parent
         + guid
         + x  (float)
         + y  (float)
         + icon
         + text
         + textfmt ("plain")
         + fill and strokecolor
         + topic and path styles (dash, arrows, width)
         + path custompoint
         + layout (none or "list")
         + link (none or local ref or URL "://" (cloud://, http://, ftp://, ..)
            ! editor supports only one link per node
         + callouts ("<children>")
            > this is a callout text
            + image
            + note (text)
         + embedded_image (<embedded-image>, "name" and "scale" attribs)
         + calendar_date  (date="24-12-2020")
   + build node tree and xrefs
      + use id/parent attribs to determine nesting
      + node relations
      + build sources/targets lists per node (relations)
   + text styles
       + textfmt="rtf1"
       + bold: text="some \\*bold\\* text"
       + text="some \\/italic\\/ text"
       + text="some \\/underlined\\/ text"
          ! apparently a bug in the windows version of simplemind, should be \\_underlined\\_ text
       + text="some \\~strike-through\\~ text"
       + text="some \\`subscript\\` text"
          ! not converted to org (uses ^{some text} syntax, not displayed in emacs anyway)
       + text="some \\^superscript\\^ text"
          ! not converted to org (uses _{some text} syntax, not displayed in emacs anyway)
       + "note" (callout or topic note) uses slightly different syntax, e.g. \* instead of \\*

+ smmx to markdown converter
   + traverse node tree
      + track depth (indent level)
   + topics become headers
   + add link before paragraph text when node has link
   + embedded-image becomes paragraph image
      + extract from smmx
   + image callout becomes paragraph image
      + extract from smmx
   + text callout becomes paragraph text
      + insert as-is (keep markdown tags)
      + as blockquote outside of lists
   + note becomes paragraph text
   + relations become crossreference links
      + before paragraph text
      + "sources" xref list (source_nodes) ("from:")
      + "targets" xref list (target_nodes) ("to:")
   + parent/child relations
      ! when relation has callout text (is-a, has, see, ..)
   + list layout topics become list starts
      + child nodes become list items
      + indent each note line
   + force list output when parent node note starts with "!list"
   + insert TOC
      + $(buf!toc)
   + footer (w3c, generation date)

? markdown to smmx converter
   - headers become topics
   - paragraph text becomes callout note
   - images become callout images

+ smmx to org-mode converter
   ! https://orgmode.org/manual/
   + add header
      -*-mode: org-*-
      #+TODO: IDEA TODO ACTV TEST DONT IGNR NOTE | DONE
   + traverse node tree
      + track depth (indent level)
      + root (main-centraltheme) becomes title
   x find #tags in text callouts and build :tag:list:
      + :org-tags: property in note
   + parse properties embedded in note
   + icon determines item type/state (todo, done, ..)
       ic8_48_information  IDEA
       ic8_48_light_on     IDEA (alt.)
       ic8_48_roadworks    TODO
       ic8_48_hammer       ACTV
       ic8_48_running      TEST
       ic8_48_delete       DONT
       ic8_48_winter       IGNR
       ic8_48_ok           DONE
   + icon determines sub-item state (+,-,o,x,!)
       ic8_48_red_flag     - (todo)
       ic8_48_yellow_flag  o (active)
       ic8_48_green_flag   + (done)
       ic8_48_light_off    ! (info)
       ic8_48_delete       x (dont)
       - alternatively support main item state icon when parsing smmx
   + support rollup progress bars
       > for + and - sub items
   + convert date to first sub-item note
       date="24-12-2020"  (in smmx)
       =>  ! 24Dec2020
       + :smmx-calendar-date-type: property (create,finish,deadline,scheduled)
   + save node position
       x="922.22" y="901.11"  (in smmx)
       =>  ! x="922.22" y="901.11"
   + image callouts
      + save as properties (:image-callout-*:)
   + extract images
      + full-size images
      + thumbnails
   + text callouts
      + save position, style, .. as properties
      + create "> callout" lines

+ org-mode to smmx converter
   + parse main and sub-items
      + parse item calendar date
      + parse item position
   + only use freeform layout when all main nodes have positions
   + use top-down layout by default
   + use list layout when root node has more than 20 children
      + split huge, linear todo lists into up to 20 "pages" (virtual parent nodes)
   + use template smmx file
   + images
      + embedded (in topic)
      + thumbnail
      + callout
         + external links
   + links
   + create .smmx zip file
      + documents/mindmap.xml
      + add images (.png)

x smmx to svg converter
   - generate HTML with inlined SVG
   - generate separate .svg file
   ! too complicated, maybe (much) later



+ "----------------------" separator sub/main node
    or "==============" 
    or "***************" 
    or "_______________________________" 
    or "++++++++++++++++++++++++++"
    or "~~~~~~~~~~~~~~~~~~~~~~"
    or ".............................."
    or "##############################"
    + remember separator style
    + org: separator_style (none, minus, equal, asterisk, underscore, plus, tilde, dot, hash)
    + attach "org-separator" property to next node when converting to smmx
       x but only if no other text follows before next node
       + line has to start with at least 16 separator chars
    + restore separator_style field when converting back to org
    + separator width config option (def=79)
    + optional caption after "-----"
    ! haha, interesting: org-mode actually supports these !

% adaptive topic font-scale
   - CalcFontScaleByString() : float
   - write custom font-scale only if it does not equal calculated one
   ! should be done by mindmap tool instead

% cmdlineoption: no progress (no checkboxes)
   ! in smmx output

% cmdlineoption: no icons
   ! in smmx output

% cmdlineoption: remove-smmx-properties
   ! in org output

x org-mode header below todo.txt style header
   - convert to todo.txt style

x ° an idea 
   ! alt-shift-; on US kbd
   ==> utf8 char, not a wise choice

+ % an idea

+ ; comment line

+ alternative effort:  my topic (1h)

+ simplified effort/depends/allocate/resource/workinghours/vacation via
   + effort: 4h
   + depends: some-topic
   + allocate: bsp
   + resource
   + resource: new-resource-id
   + workinghours: mo-do, 9-5
   + vacation: <2020-02-10> - <2020-02-15>

+ alternative date format: 31.12.2020  (with dots)

% #hash #tag parser
   ! alternative to :tag:list:

+ schedule: output to CSV
   + columns:
      + task-name (topic title)
      + resource
      + start date
      + end date
      + comment (text callouts)

+ xlsx project plan template
   + schedule_sim_city.xlsx

+ other-project: <date> - <date>
+ sickness: <date> - <date>

+ "-if,--inversefilter"  blacklist topics

+ apply filter to schedule
   + always schedule everything
   + exclude filtered out topics from debug and CSV output

+ filter out parent topic/task by tags only when it has any tags
   ! mainly useful for keeping taskgroups

+ #+allowed-tags: mytag,othertag,thirdtag
   + when set, fail when 'unknown' tag is used
   ? use levenshtein/hirschberg to suggest other tag

+ #\+include: my_tags_file.txt
  #\+include: resources.txt
  + Org.setIncludePath()
     + initially set to .org file dirname
  + indent included file lines depending on #+include indent

+ fold
   + stop schedule recursion (don't process child tasks)
   + accumulate effort of subnodes and add to 'this' node effort
      ! will only work if parent task is assigned to exactly one resource
   + don't export child tasks to schedule
   + but: export to .org files ("is public")

+ private
   ! meant for detailed tech notes / detailed sub-tasks or private notes
   + don't export child tasks to schedule or other org files
   + sub-task efforts will still be accumulated to (non-private) parent topic
   + cmdline: -p,--private
      ! must be present or private flag will be ignored
         ! otherwise we wouldn't be able to process our own, private .org files

+ ignore
   ! meant for work-in-progress nodes
   + do not export child tasks to schedule
   + do not accumulate efforts
   + but: will be exported to .org files ("is public")
      + unless 'private' keyword is used

+ stop scheduler recursion when node state is not <none>,TODO,ACTV,TEST,DONE

% cmdline: --purge-expired-unavail-dates
   - remove other-project, sickness, vacation periods that have expired
   ! useful when writing new .org file

+ cmdline: -psp,--prefer-simplified-properties
   ! when exporting to .org
   + e.g. write 'allocate:' instead of :allocate: property
   + append (8d) to topic title instead of ":effort: 8d" property

+ 'ordered' property

+ html:plan: output scheduled plan as HTML
   + use joint table cells
      ! colspan
   + write resource names to first table cell
   ! no need for excel (if we just want to look at the plan)
      ! plus it's fully automatic
   + comments (text callouts)

% parse WB and update task effortleft/effortdone properties

o manual
   ! as markdown

+ output scheduled plan as markdown (table)
   + fix md "last cell empty" bug

X process multiple milestones in one call
   ? saveCSV/HTML/Markdown must be called per milestone??
   ! works when org file defines previous milestone as dependency to current one
      ! e.g. by using the "ordered" property

+ process last milestone by default
   ! under the assumption that it depends on the previous milestones
   + when selected_milestone is blank

+ -har,--html-auto-refresh

+ show parent task groups in HTML schedule

+ show tags in schedule
   + add #+schedule-tags global property
   + only show tags that exist in schedule-tags
      - or show all tags if schedule-tags is empty
   ! useful when a lot of (detail) tags exist, e.g. for grouping tasks into main "hw", "sw" categories

- variables
   ! e.g. $(NEXT_RELEASE)

+ 24.02.2020 date format

% sum emacs time-tracking lines to 'effortdone'
   - :LOGBOOK:

+ add 'finished:' simplified property
   ! in addition to '! F:24Jan2020'

+ when task was finished before project-start, ignore it in scheduler

% -de,--default-effort cmdline option
   ! useful when exporting a plain todo list and not all tasks have been assigned an effort

% -da,--default-allocate cmdline option
   ! useful when exporting a plain todo list and not all tasks have been assigned a resource

+ -ssg,--scheduler-skip-gantt
   ! don't export gantt graph in project plan
   ! just show a list of tasks with start/end dates
   ! useful when efforts have not been estimated, yet
   + scheduler::b_skip_gantt

% gantt graph: add 'finish'/'goal' icon to milestones

+ single day vacations
   + set interval end to start
   ! already done

+ public holidays
   ! eastern, christmas, ..
   + #+public-holiday: <2020-12-24>
   + add "no-public-holidays" property for resources ?
      + exclude resource from public holidays (by default)

+ schedule to html: use different color for duration-bound tasks
   + "gdo", "gde" CSS classes

+ gantt: show weekends and public holidays
   + yellow background

+ gantt: show resource unavailability
   ! holidays, other projects, ..
   + slightly darker bg color

? handle "side"/"support" tasks where a resource will only be utilized partially
   ? split resource and limit working hours
      ! how MS does it. see <https://social.technet.microsoft.com/Forums/windows/en-US/9dc1bcfd-f396-404d-9139-51f666058215/partial-allocation-of-a-resource?forum=projectserver2010general>
   ? partial allocation
      ! e.g. via "allocate: peter (20%)"
        x peter handles 20% of the total effort
        ? or: 20% of peter's time is allocated to this task

? co-dependent resource allocation
   ! must allocate all listed resources simultaneously, e.g.
      ! e.g.
         * Some Task (7d)
            must-allocate: peter (80%), paul (20%)

? "other-project: <date> - <date> (50%)"
   - partially limit resource availability during a certain period
   ! potential issue: the same resource info is supposed to be included in _all_ projects, so what is this "other-project" ?

+ update scheduler and increase granularity (hours, minutes)
   + per resource: fill 'day slots' with available hours
      + don't know the number of days so will have to reserve a certain number of days
   + subtract from available day hours while scheduling tasks
   + advance tCur/schedule_end by hours
      ! so that next dependent task can be started on same day if there are still some hours left
   + test with "Supper" example (schedule_finished_before_start.org)
   + test with "Sim City" example

? task switch penalty
   - consume <f> hours for each additional day task (e.g. f=0.5)

+ html: add overview gantt graph (small cells)
   + use <td> 'title' attribute to add tooltip

+ html: order tasks by start date
   + -sbsd,--sort-by-start-date command line option

? multi-project mode
   - reset/init resource allocation before first project
   - schedule all projects (=> consume resource work hours)
   - print report only for "current" project
   ? the only "sane" way to handle otherwise busy resources ?

x when task has finished date, let it override the scheduling (ignore effort left)
   ! no, would need to know the per-day resource utilization

+ resource time tracking
   x 'h' after hour is optional (=> no h at all)
   + support different date formats (25Jan2020, 20200125, <2020-01-25>, ..)
   o format:
       ; entire day on one line (just one task)
       day 25.01.2020 8h sim-city.diesel-generator   space for arbitrary comments

       ; indented day
       day 25Jan2020:
         09:30 - 18:00
         8  sim-city.diesel-generator   ; space for arbitrary comments

       ; 2h break
       day 25.Jan.2020:
         09:30 - 18:00 (2h)
         8  sim-city.diesel-generator   ; space for arbitrary comments

       ; multiple intervals (2h break after 14:00)
       day 25.Jan.2020:
         09:30 - 14:00
         16:00 - 18:00
         8  sim-city.diesel-generator   ; space for arbitrary comments

       ; just the project name
       day 25Jan2020 8h sim-city

       ; weekly time mon-sun
       week 03.Feb.2020:    first day of the way
         sim-city.diesel-generator  7 0 0   0   0   ; arbitrary comment
         admin                      1 0 0   0   0
         sim-city.wind-turbines     0 8 0 6.5 6.5   ;

       ? '-' or 'x' = not a workday, 'h'=holiday, 'f'/'g'=flex time ?
       - warn when daily sum exceeds max working hours (10h)
         

   x subtract all time entries from available daily times when scheduling starts
      ==> no, set available day time to 0 when time entry/entries for that day exist

   o when resolving task id..
      + try to match exact task id
      2) try to match exact anchorfied task title
      3) try to match task path, e.g. sim-city.brewery.build
          - match ids or anchorfied task titles

+ generate resource time tracking summary
   x -tts,--time-track-summary <pjt> <res>
   + -ttp,--time-tracking-project <pjt>
       ! sets time entry project filter
   - just enough info for scheduling
      ! i.e. only need to know how many hours per project
      - option: include exact times and breaks
      - option: include exact tasks
      - option: list projects other than current one as "other"
   - generate file that can be included in resource definition

+ #\+include: private_time.org public_time_summary.org
   x #+try-include
   + try multiple files
   + fail only when none of the files could be included

+ scheduler: take into account actual number of hours
   ! could be more or less than projected number of hours
      ! more=overtime
      ! less=worked on other projects instead
   + override workinghours when actual number is available

+ html gantt: show exact resource allocation in tooltip, e.g.
   "mary: diesel-generator (8h)"

+ -itt,--ignore-time-tracking command line option

+ scheduler: automatically increase task effort when resources have spent more time than initially anticipated
   + calc task.actual_effort by summing all timesheet entries for that task
   + print warning if this exceeds the (estimated) 'effort'
   + effortLeft = max(effort, actual_effort)
      + unless task is DONE, then effortLeft = actual_effort

+ -ttp,--time-tracking-project <project-id>
   + filter time tracking entries by project

+ -sf,--state-filter <statelist>

+ -so,--stdout <type>

x -af,--allocate-filter <resourcelist>
    ==> -pf 'allocate=*resourcename*'

+ -pf--filter-property name=value-pattern

? -pfn,--filter-property-name
? -pfv,--filter-property-value

? #+tags-default

? inherit tags from parent ?

+ #+effort-default

+ per-task timetracking
   + export to auto-generic "<res>_public.org" files
   ! in emacs org-mode:
      ! :LOGBOOK:
      ! CLOCK: [2017-04-10 Mon 15:18]
      ! CLOCK: [2017-04-10 Mon 15:16]--[2017-04-10 Mon 15:17] =>  0:01
      ! CLOCK: [2017-04-07 Fri 16:05]--[2017-04-07 Fri 16:35] =>  0:30
      ! CLOCK: [2017-04-05 Wed 16:42]--[2017-04-05 Wed 16:52] =>  0:10
      ! :END:
   + clock: <res> <date> <h>
   + or clock: <date> <h>
      + requires that task is assigned to exactly one resource

% mantis integration
   - generate mantis_issues.org file from database
   - auto-import new issues from mantis_issues.org into database
   ? mantis plugin ?

+ -ktcp,--keep-task-clock-properties

+ 'clock' properties in resource definition

+ re-export time sheet entries as "clock" lines instead of "week" (in resource def)

+ handle 'org-tags-column' global property
   ! overrides default indentation
   + negative value: right-align tags
   + positive value: left-align tags

+ handle case where task b depends on a but b is already being worked on before a is fully completed
   ! tests_org/timetracking_path_match.org
   + move actual task start to the day where the first resource starts working on task
   + however, regular workhour consumption must not commence before planned task start

+ print warning when a resource is working on a task it is not assigned to
   ! hours will be ignored (until the .org file is fixed/updated)

+ scheduler:html: resource view
   + similar to project plan but place resources on left side (vertical) 
      and show which projects they are working on are planned to work on

+ :scheduler:md: update md export
   + implement generic md table generator (MDTable class)
   + add effort done

+ allow ':' to be skipped in tag list before title
    ! e.g.  "- scheduler:md: update md export"
    + check if (potential) tag list contains spaces
       + don't interpret as tags if it does

+ optimize indent (string append)
   + String.appendRepeat()
   + clean up

+ html:plan: show actual and planned resource usage in cell tooltip
   + daily (empty cells)
   + total task summary

+ traffic light status
   + 'status' property ?
      ! for explanations (e.g. "stuck on debugging")
      + simplified "status:" property
   + status: not good, found some bugs
      + interpret text after "," or ":" as additional status comment

+ html:plan: append 'status' text to comment (additional row)

+ traffic light report (all tasks)
   x 'traffic-light' property ?
      - red when actual effort exceed estimation (set automatically)
      - yellow = iceberg ahead
      - green = all things a-ok
   + add "Status" column to project plan
   + traffic light icons
   + "-stl,--schedule-traffic-lights"

? 'scheduled' property: what to do with it ?
   - force task start
      - even though no one may be working on it
   ! this would (probably) mostly be useful to plan a whole set of projects (i.e. if each 'task' is a project)

+ html:plan: move CSS to dedicated file
   + allow local FS override
      + "html_plan.css", must be placed in CWD
      + or in_path_prefix+".css", e.g. "tests_org/my_project_plan.css"

+ html:plan: change colorization
   + green: completed task
   + yellow/greenish: task is work in progress
      ! (tracked_effort > 0)
   + yellow/reddish: task is work in progress but traffic light is yellow
   + orange: task start was scheduled in the past but no one's working on it
   + red: task tracked effort exceeds estimation OR traffic light is red
   + blue: planned task (no tracked effort)
   + black: milestone

+ manual: document clock task path feature

% support multiple (sub-)projects ?
   - 'project' property
      - set project name and (anchorfied) id
   - first clock task-id path element can refer to project id

+ escaped text blocks via "<<...>>"
   ! e.g. for markdown text
   + can contain empty lines
   + remove indentation but do not trim lines
   + insert << and >> when re-exporting to org

o html:plan: append task descriptions below plan overview
   + description = node text lines
   + use app:md for markdown=>html conversion
   + "-smd,--scheduler-markdown-docs" command line switch
      ! ==> now renamed to "-docs,--docs" [02Feb2020]
   + begin / end markdown tags
      ! So lists can work
      x "begin markdown" / "end markdown"
      x or "md>>..<<md"
      x or "<md>..</md>"
         - error when begin tag is not closed, or when end tag occurs outside of md block
      ! actually we need a generic "text start", "text end" tags
         + ">>" and "<<" lines
      x "content: markdown" property
         ! can't work, need an end tag (unless the markdown contains no lists etc)
      + generate/append to temporary markdown file
      x or pipe to app:md ?
   + concatenate all task descriptions to md buffer
      + include task groups
      + subtract node indentation
   + when task description exists, turn task-names in plan column to links
      x generate doc_id from title (may differ from task_id)
         ! wouldn't be unique (e.g. multiple "test" tasks)
      + create explicit anchor in markdown (extension)
         + "# header {my-anchor}"
   + info nodes
      ! e.g. for introduction, project goals, ..

- docs: reference section (header) in external markdown file
   - "markdown: md/tasks.md:org-manual"
   x add option to app:md that generates HTML only for a specific section
   - or: load .md and extract section 
      - this also makes error handling (invalid file, invalid section) easier
      - handle explicit section anchors {my-id}

+ default milestone (when no explicit milestone task exists): add all tasks
   ! so a simple todo.txt file like this one can be scheduled

+ lazy set start-date to tomorrow

+ handle wday interval sa-su  (wdayidx 6-0)

+ when folding tasks, auto-add resource allocations from sub tasks
   + unique
   + recursiveFoldSubTaskAllocations()

+ DONE tasks: when tracked_effort is 0, assume total effort when task is in the future

+ make: add debug_all target

+ fix "id:" property re-export to org

+ "default resource" pseudo property
   + same as "resource" + "#+allocate-default: <resource-id>" lines

+ fold clock entries
   + replace task id by parent folder
   + tests_org/timetracking_clock_fold.org

+ html:plan: swap blue/gray (planned/active) colors

+ need a "prerequisite" or "after" keyword, or "all depends:"
   + 'after:'
   ! markdown_docs.org test case
   ! "implementation" depends on "spec" but implementation sub-tasks don't depend on anything
   + inherit parent dependencies to sub-task
      ! it would _not_ be a good idea to always do this (the sub-tasks may actually be completely independent)

+ html:plan: highlight current day (header)

% findTaskById(): search from inner to outer to better handle duplicate ids
   ! e.g. multiple "test" tasks in different modules
   ! would be useful for "inside-of-tree" dependencies

+ html:plan:md: get rid of .tmp file, use output file instead
   ! otherwise parallel make won't work

+ docs: generate unique doc_ids
   ! task ids may not be unique
      ! making them unique would break path feature

% support other markup-to-html tools
   ? add 'content-type' property 
      ! but: it would be better if each text block (<<...>>) could use a different tools,
              e.g. to combine markdown, graphs, svn/git revision queries, ..

+ add '-docs,--docs' command line switch
   + generate .html via .md without prefixing it with project plan (or going through smmx conversion)

+ html:plan:docs: HTML template file
   + replace $(TITLE) with document title
   + replace $(META) with additional meta tags
   + replace $(CSS) with style sheet data
   + replace $(PLAN) with generated HTML
   + replace $(RV) with generated HTML
   + replace $(DOCS) with generated HTML
   + replace $(W3VALIDATOR) with w3 validator icon/link
   ! e.g. for headers/footers/company and/or product logos/.. (CI in general)
   + -ht,--html-template command line option

% set task or resource id via {} (like in .md files)
   ! "* Test {module1-test}"
   ? need another cmdline option "-pid,--prefer-inlined-ids" so that these echoed-back properly
      ? or just remember a "b_inlined_id" flag

+ "-stt,--schedule-task-titles" : show task titles instead of ids in scheduler output

+ "-stls,--schedule-traffic-lights-status" : derive traffic lights from task state instead of 'status' property

+ "-pt,--plain-todo" : configure for plain todo.txt
   + auto-create "default" resource
   + set allocate-default to "default"
   + set effort-default to 1h
   + auto fold task groups
   + skip gantt charts
   + show task titles instead of ids
   + derive traffic lights from task status
   + derive (default) document title from filename

% html:plan: configurable columns
   ! e.g. for excluding "done", "start", "end" in plain todo.txt reports

X #+public-holiday broken
   ==> no, but it has to occur before first node

+ {} resource id not working

+ ° character not properly converted to HTML

+ workinghours: 7.2h   not working

+ prioritize multi-project scheduling
   ! see "multi-project mode" above
   + SCHEDULED: <date>, don't start sub-project before this date
   ! each sub-project has its own milestones
      ! i.e. scheduler must handle multiple (simultaneous/parallel) milestones
      + add invisible "all" milestone
   + handle id name-clash (tasks)
      ? prefix task/milestone ids with subproject id ?

+ "-mp,--multi-project" command line switch
   + create invisible milestone and add all milestones as dependencies

x "project", "project:" keyword
   ! similar to "resource"
   - mark node as (sub-)project
   - optionally assign project id
   ==> don't need a new keyword for this

+ "depends": handle id paths
   ! e.g. "project-one.release"

+ handle task-id sub-project namespaces
   ! avoid name clash (e.g. multiple "Release" tasks)
   + <subproject>.mypath.pattern
   + prioritize local tasks before other tasks (in same task group or sub-project)

+ test interrupted tasks (higher priority)
   + interrupted.org test case
   + interrupted2.org test case

o handle case where dependent task ends on same day but clock is already past working hour
   ! e.g. interrupted2.org, 'review' task starts at 16:00 (til 0:00)
   - save + later look at exact working hours (e.g. 8:00 - 16:00)
   + for now, assume everyone starts at 8:00
      ! fixes test "interrupted2.org"

+ risk: don't parse as factor when % is missing (always interpret as percent)

+ html:plan: compact view (-sc,--schedule-compact)
   + show calendar weeks instead of per-day date labels
   + skip "(day xyz)" cell caption

+ html:plan: highlight start of month (thick border)
+ html:plan: highlight start of week (thick border)

+ html:plan: show task dependencies in tooltip
