Package: tagmark
tagmark (Python)1. Introduction, User Guide and the Demo Page2. Why TagMark?3. TagMark Related Projects4. TagMark Architecture, Workflow and Customizing Guide5. tagmark-py User Guide5.1. Installation5.2. Usage5.2.1. subcommand: export5.2.2. subcommand: convert5.2.3. subcommand: checktag5.2.4. subcommand: autotagdef5.2.5. subcommand: maketagdoc5.2.6. Condition File Details5.3. Changelog5.4. Contributing and Development Guide5.5. TODO5.6. Credits6. Similar Tools / Projects1. Introduction, User Guide and the Demo PageTagMark is a tag-based bookmark solution I created for:Those who have a multitude of bookmarks and want to efficiently organize, easily retrieve, and share them with others.Individuals who frequently work with GitHub, have starred numerous repositories, yet struggle with how to efficiently retrieve and effectively utilize this vast amount of information.Watch this videoTagMark - Introduction and User Guidefor details:Here is the demo page of TagMark, which collected all my bookmarks:https://pwnfan.github.io/my-tagmarks/https://tagmark.pwn.fanFeatures of the page:Substantial tag based bookmarks2700+ tagged bookmarks (1800+ curated Github Repos) mainly focus on cybersecurity and related development1000+ tags with detailed tag definitionsFull featured tagstag definitions (show / hide definition by left click on tags)tag overview with countscolor difference depending on countsSimple but powerful header filter for each columnthick client: static, pure frontend and js based, so it's fast respondingsimple and useful filter grammarquickly input tag name into filter by just a right clickpress CTRL/CMD with left click in any filter input to call out multiple language document (English / Japanese / Chinese)Supporting for URL GET parameters based filteringstatic, pure frontend and js basedeasy for sharingColumns related thingsdetailed Github repository informationsuppressible columnsTemplate Tag Doc2. Why TagMark?The introduction video summarized the reasons why I made TagMark, for the detailed reasons you can read my blog (TL;DR 😅)TagMark: Maybe a Better Browser Bookmark Solution3. TagMark Related Projectstagmark-py (this repo)exporting tagged bookmarked data from other third party services, e.g. diigoconverting other bookmark formats into Tagmark format, i.etagmarks.jsonlchecking every tag has a been defined, i.e. checking tag consistency intagmarks.jsonlandtags.jsongetting tag definitions automatically with ChatGPT, i.e setting the values of the keydefinitionintags.jsonmaking document from a template containing tag related syntaxes, i.e makingtag-doc.mdtagmark-uia web page showingtagmarks.jsonl,tags.jsonand related docsmy-tagmarksmy own bookmarks data stored as TagMark datatagmarks.jsonlandtags.jsona Github Pages repo servingtagmark-uiand showing all my bookmarks, i.ehttps://pwnfan.github.io/my-tagmarks/https://tagmark.pwn.fana Github README including curated topics (i.e. tags) from my personal bookmarks4. TagMark Architecture, Workflow and Customizing GuideIf you want to customize your ownmy-tagmarks, here is a overview of TagMark architecture and workflow you need to get familiar with:│                                                                         https://pwnfan.github.io/my-tagmarks    
   #0│   ╔═════════════╗          ╔═══════════════╗       ╔═════════════════╗  i.e. https://tagmark.pwn.fan            
   start ║  [original  ║          ║[exported data]║       ║  {tagmark-py}   ║                     ▲                    
     └──>║  bookmark   ║          ║               ║       ║   (this repo)   ║            #9 deploy│Github Pages        
         ║    data]    ║          ║ ░diigo░tool░░ ║       ║                 ║                     │                    
         ║             ║    ┌─────║>exported░data ║       ║   ████████████  ║  ┌──────────────────┼────────┐           
         ║ ░pwnfan's░░ ║    │     ║ ░░░(.html)░░░ ║ ┌──#2b.2──█subcommand█  ║  │         ╔════════════════╗│           
    ┌────║─░untagged░░ ║    │     ║               ║ │     ║   ███export███  ║  │         ║ {my-tagmarks}  ║│  #6.1     
    #1   ║ ░bookmarks░ ║    │     ║ ░░diigo░API░░ ║─┼──┐  ║   ████████████<─║──┼─┐       ║   ┌────────┐  ┌║┼──manually─
 manually║             ║    │     ║ ░dumped░data░<║─┘ #3.1║any              ║  │ │       ║   │tag-doc.│  │║│  make     
 set│tags╚═════════════╝    │     ║ ░░(.jsonl)░░░ ║   format  ████████████<─║──┘ │ ┌─#6.2║───│template│<─┘║│           
 and│add                  #2a.2   ╚═══════════════╝    └──║──>█subcommand█  ║    │ │     ║   └────────┘   ║│ #7.1      
   into                     │                             ║   ██convert███──║─┐  │ │     ║  ┌──────────┐  ║│update     
    │ ╔══════════════════╗  │    #3.2 add Github┌repo─────║───████████████  ║ │  │ │   ┌─║─>│tag-doc.md│  ║│Github     
    │ ║   {third-party   ║  │    info and covert│into     ║                 #7.2 │ │ #6.3║  └──────────┘  ║│ repo      
    │ ║bookmark & tagging║  │                   │         ║   ████████████  ║ │  │ │   │ ║   ┌────────┐   ║│ info      
    │ ║     service}     ║  │    ╔═════════════╗│ ┌──#4.1─║──>█subcommand█  ║ └──┼─┼───┼─║──>│tagmarks├───║everyday    
    │ ║                  ║  │    ║  [TagMark   ║│ │       ║   ██checktag██  ║    │ │ ┌─┼─║──>│ .json  │   ║            
    │ ║    ███diigo███   ║  │    ║    data]    ║│ │  ┌────║───████████████  ║    │ │ │ │ ║   └────────┘   ║            
    └─║───>██browser██   ║  │    ║             ║│ │ #4.2 add                ║    │ │ │ │ ║  ┌─────────┐   ║            
      ║    █extension█   ║  │  ┌─║──░░░░░░░░░<─║┘ │ missing   ████████████  ║    │ │┌┼─┼─║─>│tags.json│   ║            
      ║         │        ║  │ #3.3  ░TagMark░  ║  │ tags  ║   █subcommand█  ║    │ │││ │ ║  └─────────┘   ║            
      ║         │        ║  │  │ ║  bookmarks  ║  │  │    ║   █autotagdef█  ║    │ │││ │ ║  ┌──────────┐  ║            
      ║         ▼        ║  │  │ ║  (tagmarks  ║──┘  │ ┌#5.1─>████████████──║──┐ │ │││ │ ║  │tagmark-ui│  ║            
      ║    ███diigo███   ║  │  │ ║  ░.jsonl)░  ║     │ │  ║                 ║  │ │ │││ │ ║  └────▲─────┘  ║            
      ║    ██website██   ║  │  │ ║  ░░░░░░░░░  ║     │ │  ║   ████████████  ║  │ │ │││ │ ║       │        ║            
      ║         │        ║  │  │ ║             ║─────┼─┼#6.1─>█subcommand█<─║──┼─┼─┘││ │ ╚══════#8════════╝            
      ║         │  #2a.1 ║  │  │ ║ ░░░░░░░░░░░ ║     │ │  ║   █maketagdoc█──║──┼─┼──┼┼─┘         │                     
      ║         │ manually  │  │ ║ ░░TagMark░░<║─────┘ │  ║   ████████████  ║  │ │  ││  ╔═══════════════════╗          
      ║ ┌───────┴──run─on║  │┌─┼─║>░tags░info░─║───────┘  ╚═════════════════╝  │ │  ││  ║   {tagmark-ui}    ║          
      ║ │        diggo page ││ │ ║ (tags.json)<║─#5.2─define─tags─with─ChatGPT─┘ │  ││  ║ ┌──────────┐      ║          
      ║ │              │ ║  ││ │ ║ ░░░░░░░░░░░─║──────────#5.3───────────────────┼──┘│  ║ │filter doc├─┐    ║          
      ║ ▼              ▼ ║  ││ │ ║      │      ║                                 │   │  ║ │(EN/CN/JP)│ ├──┐ ║          
      ║ █diigo█ █diigo██ ║  ││ │ ╚═════════════╝                                 │   │  ║ └─┬────────┘ │  │ ║          
      ║ web█API █export█─║──┘│ │        │                                        │   │  ║   └──┬───────┘  │ ║          
      ║ ███████ ██tool██ ║   └─┼─────#4.3 manually set the values of keys        │   │  ║      └──────────┘ ║          
      ║   │              ║     │     `abbr/alias/full_name/gpt_prompt_context    │   │  ║  ┌─────────────┐  ║          
      ╚══════════════════╝     │     /prefer_format` for new added tags          │   │  ║  │Web Page Code│  ║          
          │                    │                                                 │   │  ║  └─────────────┘  ║          
          │                    └─────────────────────────────────────────────────┼───┘  ╚═══════════════════╝          
          └────────────────────────────#2b.1─respond─to──────────────────────────┘                                     
                                                                                                                       
                                                                                                                       
Steps Flow:                                                                                                            
              (option a)     ┌─>#3.1────>#3.2────>#3.3  ┌──>#5.1────>#5.2────>#5.3──┐  ┌─────────────┐                 
          ┌─>#2a.1──>#2a.2───┤                     │    │                       │   └─>│ #7.1───>7.2 │                 
      #1──┤                  │    ┌────────────────┘    │     ┌─────────────────┘      │             │                 
          └─>#2b.1──>#2b.2───┘    ▼                     │     ▼                     ┌─>│   #8   #9   │                 
              (option b)        #4.1────>#4.2────>#4.3──┘   #6.1────>#6.2────>#6.3──┘  └─────────────┘                 
                                               (suggested)  (------optional-------)Steps note and customizing suggestions:Steps requiring manual works#1:the first time involves a full workload of tagging all your bookmarks, which may take a considerable amount of time, but subsequent efforts only involve incremental tasks, which are much more easierdiigo related resourcesChrome Extension: Diigo Web Collector - Capture and AnnotateDiigo WebsiteDiigo Tools / Export#2a.xuse alternative #2b is suggested#2a.1 does't work well recently, may be due to some problems on theDiigo Tools / Exportservice side，which impelled me to made an alternative #2b insteadnotice that #2b exploits a web API of diigo and acts like a crawler to retrieve your own bookmarks, it's a trade-off option so we'd better not frequently use it, and I have added some sleep time between successive requestsDiigo hasits own official APIfor retrieving bookmarks but it is a premium (paid) feature, may be it's a better option to become a premium user and add the related retrieving feature (plugin) intotagmark-pyexportsubcommand#4.3optional but suggested if you want reading-friendly tag names and exact tag definitions shown in the web page (i.e. tagmark-ui)similar to #1, the first time involves a full workload, which may take a considerable amount of time, but subsequent efforts only involve incremental tasks and are much more easier#6.xoptional, if you don't need a TagMark tag doc, you can skip these stepsmay take a considerable amount of time if you have many bookmarks and tags, and want to well categorize them into different topics, but fortunately this is just an one-off work#7, #8, and #9 form a unit in which the prerequisite dependencies are Steps #1 through #6. However, Steps #7, #8, and #9 are independent of each other and have no interdependenciesSome steps are auto done by Github Actions, most of which are located in repomy-tagmarksto ensure these actions function correctly, you may need to set repovarsandsecretswhich will be used in these actions#6.2 and #6.3my-tagmarks/.github/workflows/update-tag-doc.yml${{ secrets.GH_PAT_TAGMARK }}#7:my-tagmarks/.github/workflows/update-tagmark-data.yml${{ secrets.GH_PAT_TAGMARK }}${{ vars.TAGMARK_DATA_EXPIRED_HOURS }}#8: trigger whentagmark-uihas new committagmark-ui/.github/workflows/github-page-update.yml: used to notify repomy-tagmarksof thetagmark-uicode updates, if you do not need this feature, you can disable it and skip setting repovarsandsecrets${{ secrets.GH_PAT_TAGMARK }}${{ vars.GH_PAGES_REPO }}my-tagmarks/.github/workflows/update-tagmark-ui.yml: used to receive the notify fromtagmark-uiand synchronize thetagmark-uicode intomy-tagmarks, if you do not need this feature, you can disable it and skip setting repovarsandsecrets${{ secrets.GH_PAT_TAGMARK }}${{ env.TAGMARK_UI_DIR }}#9my-tagmarks/.github/workflows/github_pages.yml: novarsandsecretsneededso the repovarsandsecretsneed to set are${{ secrets.GH_PAT_TAGMARK }}it is a personal access tokens (aka PAT) having theContents(Read and Write access to code)permission to the code of repomy-tagmarksyou need to set it in bothtagmark-uiandmy-tagmarksif you need the UI code synchronizing feature${{ vars.TAGMARK_DATA_EXPIRED_HOURS }}it determines the expiring time of the Github repo info to a bookmark, seetagmark-pysubcommandcovertfor detailsthe value I've set is23only need to be set in repomy-tagmarks5. tagmark-py User Guide5.1. Installationinstall Python >=3.11 and a virtual environment (virtualenv / pyenv / conda)installtagmark-pypipinstalltagmarkcheck tagmark runs well
command line options:(tagmark-py3.11)vscode➜/workspaces/tagmark-py(dev)$tagmark_cliUsage:tagmark_cli[OPTIONS]COMMAND[ARGS]...

Options:-h,--helpShowthismessageandexit.

Commands:exportexporttaggedbookmarkeddatafromthirdpartyservices...convertconvertotherbookmarkformatsintoTagMarkformat...checktagchecktagconsistencyintagmarkdatafile(json-lines)and...autotagdefgettagdefinitionautomaticallywithChatGPTmaketagdocmakedocumentfromatemplatecontainingtagrelatedsyntaxes5.2. Usage5.2.1. subcommand: export(tagmark-py3.11)vscode➜/workspaces/tagmark-py(dev)$tagmark_cliexport-h
Usage:tagmark_cliexport[OPTIONS]exporttaggedbookmarkeddatafromthirdpartyservicesintojsonlinesfile

Options:-f,--format[diigo_web]thirdpartyservice[default:diigo_web]-m,--max-sleep-seconds-between-requestsFLOATifmultiplerequestsareneededtoretrievethedata,inordertopreventexcessiveloadonthetargetserver,arandomtimesleepisnecessary,thisoptionsetthemaximumsleepseconds[default:3]-o,--output-file-pathFILEoutputfilepath[default:diigo_web_exported.jsonl]-h,--helpShowthismessageandexit.exportretrieves bookmarks data (with tags) from third party bookmark manager services which support tagseven though-f diigo_webis the only supported third party service now,exportsubcommand is designed to supported different services-f diigo_webrequires the diigo web cookie and reads its value from the keyDIIGO_COOKIEstored in the .env file or environment variables, so you need to set it before runexport.env file example:DIIGO_COOKIE="{YOUR DIIGO WEB COOKIE HERE}"setting-m, --max-sleep-seconds-between-requeststo more than3is recommended, though it may take longer to retrieve the whole datanote thatexportis different from other subcommands, if you runtagmark_cli exportwithout any arguments, it will not print the help message, instead it will run directly with the default values of the arguments5.2.2. subcommand: convert(tagmark-py3.11)vscode➜/workspaces/tagmark-py(dev)$tagmark_cliconvertUsage:tagmark_cliconvert[OPTIONS]convertotherbookmarkformatsintoTagMarkformat(json-lines)Options:-i,--input-file-pathFILEinputfilepath-f,--format[diigo_web_exported|diigo_exported_chrome_format|tagmark_jsonlines]formatoftheinputfile[default:diigo_web_exported]-o,--output-file-pathFILEoutputtagmarkjsonlinesdatafilepath[default:tagmarks.jsonl]-k,--keep_empty_keysBOOLEANwhetherkeepkeyswithemptyvalues[default:False]-c,--condition-json-pathFILEjsonfilecontainingtheconditionforfitleringTagmarkItem[default:/workspaces/tagmark-py/tagmark/condition_example.json]-b,--is-ban-conditionBOOLEANIfsettoTrue,aTagmarkItemhitsthe`condition`willbebanned,oritwillberemained[default:True]-t,--github_tokenTEXTtheGITHUB_TOKENtoaccessGithubAPI,defaultwillreadfromthe.envfileoftherootdirofthisproject-u,--update-github-info-after-hoursFLOATupdategithubinfoonlywhenuserspecifiednumberofhourshaspassedsincethelastupdate[default:23]-h,--helpShowthismessageandexit.converthelps to convert other bookmark formats (i.e.-f diigo_web_exported | diigo_exported_chrome_format) into TagMark data file (json-lines) and add Github info for Github repo bookmarks
command example:tagmark_cliconvert-itagmarks_all.jsonl-fdiigo_web_exported-cdata/my-condition.jsonconvertcan also be used to only update the Github repo info (stars, late commit data, etc) of a converted TagMark data file (json-lines) (i.e.-f tagmark_jsonlines)
command example:tagmark_cliconvert-idata/tagmark_ui_data.jsonl-cdata/my-condition.json-ftagmark_jsonlinesbefore runningcovert, you may need setup Github PAT, if you don't have any Github Repo Bookmarks, this step can be skippedcreate a github personal access token(PAT)tagmarkrequires PAT to access the Github API to get the repo info(stars, forks etc.) when a bookmark url is a Github repo url. The default settings to the PAT is recommended, which has no any privilege for any action to any of your repos or settings.exportreads the Github PAT from keyGITHUB_TOKENstored in the .env file or environment variables
.env file example:GITHUB_TOKEN=github_pat_XXXyou can also tellexportyour Github PAT by adding the-tparameter, which is no recommended because it may remain in your bash historyif you have bad network connection to Github API server (access from China, e.g.), you may got a lot connection errors whenconverttries to get Github repo info, in this case you may need to continue to runconvert -f tagmark_jsonlinesagain and again until all the missed Github repo info have been completedplease refer to sectionCore Options Explanation and Design Detailsfor details of the options.5.2.3. subcommand: checktag(tagmark-py3.11)vscode➜/workspaces/tagmark-py(dev)$tagmark_clichecktag
Usage:tagmark_clichecktag[OPTIONS]checktagconsistencyintagmarkdatafile(json-lines)andtagsinfofile(json)Options:-d,--tagmark-jsonlines-data-pathFILEthetagmarkjsonlinesdatafilepath,whichmaybetheoutputfilegeneratedbythe`-o`parameterofthe`convert`subcommand-t,--tags-json-pathFILEtags.jsonfilepath-c,--condition-json-pathFILEjsonfilecontainingtheconditionforfilteringTagmarkItem,hereonlythevalueof`tags`fieldinthefilewillbeused,andthisconditionmustbeabancondition[default:/workspaces/tagmark-py/tagmark/condition_example.json]-a,--add-new-tagsBOOLEANifsetto`True`,anewtags.jsonfilewillbegenerated,whichincludesoldtagsintag.jsonfile,andnewtagsinthetagmarkdatafile(specifiedby-t).[default:True]-h,--helpShowthismessageandexit.checktaghelps to verify if every tag in the output file generated by the-oparameter of theconvertsubcommand has relate tag info in the tag info json file. This ensures the web UItagmark-uifunctions correctly.
command example:tagmark_clichecktag-ddata/tagmarks.jsonl-tdata/tags.json-cdata/my-condition.jsonif you specify-a trueto runchecktag, tags only in tagmark json lines data but not in tags info json file will be added and output to a new tags info json file, before jump into the next step, you may need to manually check the newly added tags in the new tags json fileyou can find them by searching"definition": nullin most cases you need to manually set the values of keysabbr/alias/full_name/gpt_prompt_contextfor the new tags, which is the step #4.3 in the TagMark workflow diagramthis step is strongly suggested if you want reading-friendly tag names and exact tag definitions shown in the web page (i.e. tagmark-ui)if you runchecktagfor the first time, i.e. you don't hava a tags info json file (tags.json), you need to make an empty one by run:echo"{}">tags.json5.2.4. subcommand: autotagdef(tagmark-py3.11)vscode➜/workspaces/tagmark-py(dev)$tagmark_cliautotagdef
Usage:tagmark_cliautotagdef[OPTIONS]gettagdefinitionautomaticallywithChatGPT

Options:-d,--tags-info-json-pathFILEtags.json(tagsinformation)filepath-c,--gpt-config-file-pathFILEtheconfigfileforinvokingChatGPTAPI,wesugguestsetting`access_token`intheconfigfile,seehttps://github.com/acheong08/ChatGPT#--optional-configurationfordetails.-i,--gpt-conversation-idTEXTtheidofconversationinwhichto(continueto)interactwithChatGPT,ifsetto`None`anewconversationwillbecreated.Seehttps://github.com/acheong08/ChatGPT/wiki/V1#askfordetails.-t,--gpt-timeoutINTEGERthetimeoutthatGPTanswersonequestion(getonetagdefinition)[default:60]-l,--little-info-tag-is-okBOOLEAN[default:False]-h,--helpShowthismessageandexit.autotagdefhelps to get tag definition automatically from ChatGPT
command example:tagmark_cliautotagdef-ddata/tags.json-cgpt_config.json-ltruehow it work?
for example a user edited tag info (Step #4.3 in TagMark workflow diagram):"bom":{"abbr":"BOM","alias":null,"definition":null,"full_name":"Bill of Materials","gpt_prompt_context":"computer science and cybersecurity","prefer_format":"{abbr} ({full_name})"}autotagdefwill ask ChatGPT with prompt "in {gpt_prompt_context}, what is {prefer_format}?", i.e. "in computer science and cybersecurity, what is BOM (Bill of Materials)?", and set the value of key"definition"according to the response from ChatGPTthe-l, --little-info-tag-is-okoption is applying for tags like:"checklist":{"abbr":null,"alias":null,"definition":null,"full_name":null,"gpt_prompt_context":null,"prefer_format":"{tag}"}if-l trueis set, then question will be sent to ChatGPT, i.e "what is checklist?"
or if-l falseis set (default value), an errorNoEnoughTagInfoForGptPromptExceptionwill be raised
this option is for ensuring that user didn't miss editing any tag infojust like theconvertsubcommand, if you have bad network connection (access from China, e.g.) to OpenAI API server (Or maybe a API proxy server for the revChatGPT lib) , you may got a lot connection errors whenautotagdeftries to ask ChatGPT, in this case you may need to continue to runautotagdef -f tagmark_jsonlinesagain and again until all the tags have got a definition from ChatGPTautotagdefuse the python librevChatGPTto communicate with ChatGPTbut unfortunatelyrevChatGPTwas archived in 2023.08.10, I am not sure how long it will remain functionalmaybe I need to find an alternative lib forrevChatGPT, if you got related errors in runningautotagdef, please tell me in the issue of this repo-c, --gpt-config-file-pathis required forrevChatGPT, and a config file content looks like:{"access_token":"{YOUR_ACCESS_TOKEN}"}andaccess_tokencan be got by accessinghttps://chat.openai.com/api/auth/session5.2.5. subcommand: maketagdoc(tagmark-py3.11)vscode➜/workspaces/tagmark-py(dev)$tagmark_climaketagdoc
Usage:tagmark_climaketagdoc[OPTIONS]makedocumentfromatemplatecontainingtagrelatedsyntaxes

Options:-d,--tagmark-jsonlines-data-pathFILEthetagmarkjsonlinesdatafilepath,whichmaybetheoutputfilegeneratedbythe`-o`parameterofthe`convert`subcommand-t,--tags-json-pathFILEtags.jsonfilepath-s,--config-pathFILE(formatter)configurationfilepath[default:/workspaces/tagmark-py/tagmark/tools/maketagdoc.toml.default]-u,--url-baseTEXTurlbaseforgeneratingformattedlinks[default:./]-c,--condition-json-pathFILEjsonfilecontainingtheconditionforfilteringTagmarkItem,hereonlythevalueof`tags`fieldinthefilewillbeused,andthisconditionmustbeabancondition[default:/workspaces/tagmark-py/tagmark/condition_example.json]-b,--is-ban-conditionBOOLEANIfsettoTrue,aTagmarkItemhitsthe`condition`willbebanned,oritwillberemained[default:True]-m,--template-pathFILEtemplatefilepath-o,--output-file-pathFILEtheoutputfile(formattedaccordingtothetemplatefile)path[default:/workspaces/tagmark-py/formatted_tag_doc.md]-h,--helpShowthismessageandexitmaketagdocmake document from a template containing tag related syntaxes, a config file is also required but there is a default value for it
command example:tagmark_climaketagdoc-ddata/tagmarks.jsonl-uhttps://pwnfan.github.io/my-tagmarks/-tdata/tags.json-mdata/maketagdoc/tag-doc.template-odata/maketagdoc/tag-doc.mdthough I usemaketagdocto make markdown format tag doc inmy-tagmarks, actuallymaketagdoccan be generated as any doc formatif you want make other format tag doc (HTML, e.g.), you may need to customize your own config file and pass it to-s, --config-pathparametermaking other format tag doc may need to read and debug the source codetagmark-py/tagmark/tools/maketagdoc.pytagmark-py/tagmark/tools/maketagdoc.toml.defaulttagmark-py/tests/tools/test_maketagdoc.pyif you just want to make your own markdown doctag-doc.md, just refer to these template files about how to apply TagMark tag doc template syntaxes:tagmark-py/tests/data/maketagdoc_template.mdmy-tagmarks/docs/tag-doc.template5.2.6. Condition File Detailsyou may have noticed that some subcommand have these parameters:-c, --condition-json-path FILE-b, --is-ban-condition BOOLEANcondition file was not included in the architecture and workflow diagram to avoid becoming too complicated to understand.Here we will talk about the workflow containing condition file:┌──────────────┐│-b││Thisisa││ban-condition?│┌────────────┐└───────┬──────┘│TagmarkItem│││┌───────────┴┐▼
┌───────────┐└┤TagmarkItem│┌────────────────┐┌──────────┐
│TagMark││┌───────────┴┐──────>│FilterCondition│──────>│Subcommand│
│DataFile│───────>└┤TagmarkItem│└────────────────┘│Processing│
└───────────┘│┌──────────┴─┐▲└──────────┘└─┤TagmarkItem││││┌────────┴───────┐└────────────┘│-c││ConditionFile│└────────────────┘-cspecify a json file containing the condition for fitlering TagmarkItem, the default condition file istagmark/condition_example.json, with content of:{"tags":["Diigo"],"valid":true}What is a TagmarkItem? Taking a look at the output file format of-o, which is a json-lines format file, with one json data in one line. It is the json dump of TagmarkItem object, one line json data looks like:{"url":"https://github.com/jonschlinkert/remarkable","id":2,"valid":true,"title":"jonschlinkert/remarkable: Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdan","tags":["dev","frontend","javascript","markdown"],"is_github_url":true,"github_repo_info":{"url":"https://github.com/jonschlinkert/remarkable","owner":"jonschlinkert","name":"remarkable","description":"Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.","time_created":"2014-09-01T17:57:42Z","time_last_commit":"2023-03-30T05:55:40Z","count_star":5514,"count_fork":396,"count_watcher":5514,"topics":["commonmark","compile","docusaurus","gfm","javascript","jonschlinkert","markdown","markdown-it","markdown-parser","md","node","nodejs","parse","parser","syntax-highlighting"]},"time_added":"1682907038"}you can treat this json structure as the data structure of a TagmarkItem,-ccondition file and-bspecify a filter telling tagmark if or not to output a TagmarkItem into the-ooutput file.for example, if youdo notneed any lines with tagjavascriptorcssto be output in the output file, you should specify your condition file by-c my_condition.jsonwith the content below:{"tags":["javascript","css"],}and you need to specify the-b True (default)option, which means if a TagmarkItem meets the condition, it will be banned and will not be exported into to output file.On the contrary, if you only need lines with tagjavascriptorcssto be output into the output file, you need to specify the-b Falseoption, which means if a TagmarkItem meets the condition, it will be picked out(not banned) and put into the output file.Note that not all keys in TagmarkItem are supported in condition filter files, here is a table for details:keyvalue typesupported in condition filecondition examplemeaningurlstringyes"url": ["github", "stackoverflow"]url contains "github"or"stackoverflow"idintno--validbooleanyes"valid": truethe url is valid(valid check haven't been implemented)titlestringyes(similar tourl)(similar tourl)tagsarrayyes"tags": ["python", "javascript"]tags contains "python"or"javascript"is_github_urlbooleanyes(similar tovalid)(similar tovalid)github_repo_infonested objectno--time_addedstringno--All values in condition file iscase-sensitive.5.3. Changelogseedocs/CHANGELOG.md5.4. Contributing and Development GuideWelcome you to join the development of tagmark. Please seedocs/CONTRIBUTING.md5.5. TODOlib.data: skip dumping some tagmark item according to user inputTagmark.get_github_repo_infos add condition filteradd msg to show rate of process inconvertcommand because it may be slow when there are a plenty of github repo urlslib.data: add github repo license info into TagmarkItemvalidate url availability and set TagmarkItem.valid according to the resultgithub repo urlnot github repo urlautomatically find a forked repo of invalid github repo, replace the old repo url with forked repo url, and add comment to explain whyupdate github info only when user specified number of hours has passed since the last update.add subcommandcheatsheetmaketagdocto make a cheat sheet from a pre-defined template fileadd test case forcli.pymake customized tag supporting bookmark collector for TagMark5.6. CreditsDiigoChatGPT6. Similar Tools / Projectstag supporting bookmark manager (tagmark-py&tagmark-uialternative)Diigo: Better reading and research with annotation, highlighter, sticky notes, archiving, bookmarking & more.cybersecurity tool collection with tags (my-tagmarksalternative)offsec.tools: A vast collection of security tools for bug bounty, pentest and red teamingWebHackersWeapons: Web Hacker's Weapons / A collection of cool tools used by Web hackers.