diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..6bd67dc4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +argmap.code-workspace +.vscode/* +!.vscode/launch.json +!.vscode/settings.json +archive +lua_modules/ +Input/* +Input/Archived/ +Output/* +examples/* +9bee0f80d302c53bc6ca6edbf3789ef438394fb8.png diff --git a/LICENSE b/LICENSE index f964189b..c35273f8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,8 @@ MIT License -Copyright (c) 2019 David Sanson +Changes in https://github.com/s6mike/argmap Copyright (c) 2022 Michael Hayes + +Original code in https://github.com/dsanson/argmap Copyright (c) 2019 David Sanson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +20,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/README.markdown b/README.markdown index 48f7bb2c..399979d5 100644 --- a/README.markdown +++ b/README.markdown @@ -3,6 +3,12 @@ Argument Maps in YAML [![](examples/2cc90b7c54f340b9e4589f2c1b5a26589a5f2653.png)](https://drive.mindmup.com/map/18asUocP9fUtPbA8h4-qtTTfem0bxGunB) +This project is not being actively maintained by me at the moment. If you are interested in it, you might consider Michael Hayes's fork: https://github.com/s6mike/argmap. + +Some of his fixes and improvements are on branches, see relevant [NEWS.md](NEWS.md) for change notes. + +------------- + This repository contains some tools for working with argument maps written in a relatively simple [`YAML`](https://yaml.org/) format, described below. For example, the map above was generated from this `YAML`: @@ -24,13 +30,18 @@ Mode](https://www.mindmup.com/tutorials/argument-visualization.html). Installation ------------ -Place `argmap2mup`, `argmap2tikz`, and `mup2argmap` somewhere in your path. +Place `argmap2mup`, `argmap2tikz`, and `mup2argmap` somewhere in your path e.g. ~/bin. + Place `pandoc-argmap.lua` in the `filters` folder inside your pandoc data directory, e.g., `$HOME/.pandoc/filters/pandoc-argmap.lua`. Dependencies ------------ +Lua: using Lua version 5.3.4 + +See environment.yml for other dependencies and version numbers. + `argmap2mup`, `argmap2tikz`, and `mup2argmap` require [penlight](https://github.com/stevedonovan/Penlight) (for command line option parsing), , [lyaml](https://github.com/gvvaughan/lyaml) (for parsing `YAML`), @@ -632,6 +643,19 @@ generates individual pdf files for each map, and then converts them to png using ImageMagick's `convert` command. It replaces the code block with a paragraph containing the generated image, linked to the mindmup file. +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. + +# Fork details + +Fork of https://github.com/dsanson/argmap + +Installed with lua 5.3.4 + +Fixed some issues (potentially caused by different lua version). + + TODO ---- @@ -652,4 +676,3 @@ TODO - [x] mup2argmap should support fetching mup files from Google Drive and offer embeddable output (i.e., code block with both name and gid attributes) - diff --git a/argmap2mup b/argmap2mup index 55e92a11..a1639b7b 100755 --- a/argmap2mup +++ b/argmap2mup @@ -551,8 +551,8 @@ function parse_options(a) end function main() - print(args) - local opts = parse_options(args) + --print(args) + local opts = parse_options(arg) if opts["help"] then return help() else @@ -569,7 +569,8 @@ function main() output["ideas"] = parse_claims(argmap) output["title"] = name local mup = json.encode(output) - + + local folderopt = "" if opts["upload"] and opts["gdrive_id"] then pipe_in_out("gdrive update " .. "--no-progress " .. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md new file mode 100644 index 00000000..82d32088 --- /dev/null +++ b/docs/CHANGELOG.md @@ -0,0 +1,48 @@ +Argmap Project News +=================== + +# argmap 1.1.5 + +- `pandoc-argmap.lua`: Fix crashes for 2 [README.md](../README.md) md to pdf examples. Close s6mike/argmap#19. +- Update `.gitignore` + +# argmap 1.1.4 + +- Rename this file to docs/CHANGELOG.md +- Refined conda install environment. + +# argmap 1.1.3 + +- Update [README](README.markdown). + +# argmap 1.1.2 + +- Update [README](README.markdown). + +# argmap 1.1.1 + +- Updated my changes to start from 1.1.0 for continuity from dsanson's original repo. + +# argmap 1.1.0 + +- Fork of +- argmap2mup fix (potentially caused by different lua version): + - Close s6mike/argmap#1 output file start with 'nil' + - Close s6mike/argmap#2 gdrive upload fails +- Update license and readme. +- Add .gitignore, conda export: environment.yml + +# argmap 1.0.2 + +- Update [README](README.markdown). + +# argmap 1.0.1 + +- Update [README](README.markdown), [license](LICENSE). +- Add this NEWS.md file. + +# argmap 1.0.0 + +Original + +Uses Semantic Versioning: and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..ab991f23 --- /dev/null +++ b/environment.yml @@ -0,0 +1,29 @@ +name: argmaps +channels: + - anaconda + - conda-forge + - defaults +dependencies: + - _libgcc_mutex=0.1=main + - _openmp_mutex=5.1=1_gnu + - ca-certificates=2022.4.26=h06a4308_0 + - icu=68.1=h2531618_0 + - libgcc-ng=11.2.0=h1234567_1 + - libgomp=11.2.0=h1234567_1 + - libstdcxx-ng=11.2.0=h1234567_1 + - libuv=1.40.0=h7b6447c_0 + - lua=5.3.4=h7b6447c_0 + - luarocks=3.7.0=lua53h06a4308_0 + - ncurses=6.3=h7f8727e_2 + - nodejs=16.13.1=hb931c9a_0 + - openssl=1.1.1o=h7f8727e_0 + - pandoc=2.12=h06a4308_0 + - readline=7.0=h7b6447c_5 + - unzip=6.0=h7f98852_3 + - yaml=0.2.5=h7b6447c_0 + - zlib=1.2.12=h7f8727e_2 +variables: + LUA_CPATH: /home/s6mike/git_projects/argmap/lua_modules/lib/lua/5.3/?.so;/opt/miniconda3/envs/argmaps/lib/lua/5.3/?.so;/opt/miniconda3/envs/argmaps/share/lua/5.3/lua_modules/lib/lua/5.3/?.so;/opt/miniconda3/envs/argmaps/lib/lua/5.3/loadall.so;./?.so;/home/s6mike/.luarocks/lib/lua/5.3/?.so + LUA_PATH: /home/s6mike/git_projects/argmap/lua_modules/share/lua/5.3/?.lua;/home/s6mike/git_projects/argmap/lua_modules/share/lua/5.3/?/init.lua;/opt/miniconda3/envs/argmaps/share/lua/5.3/?.lua;/opt/miniconda3/envs/argmaps/share/lua/5.3/?/init.lua;/opt/miniconda3/envs/argmaps/share/lua/5.3/lua_modules/share/lua/5.3/?.lua;/opt/miniconda3/envs/argmaps/share/lua/5.3/lua_modules/share/lua/5.3/?/init.lua;/opt/miniconda3/envs/argmaps/lib/lua/5.3/?.lua;/opt/miniconda3/envs/argmaps/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua;/home/s6mike/.luarocks/share/lua/5.3/?.lua;/home/s6mike/.luarocks/share/lua/5.3/?/init.lua + PATH: /home/s6mike/git_projects/argmap/lua_modules/bin:/home/s6mike/.luarocks/bin:/home/s6mike/bin:/opt/miniconda3/envs/argmaps/bin:/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games +prefix: /opt/miniconda3/envs/argmaps diff --git a/pandoc-argmap.lua b/pandoc-argmap.lua index 3ab0fdd4..4a3134ef 100644 --- a/pandoc-argmap.lua +++ b/pandoc-argmap.lua @@ -20,12 +20,12 @@ local function argmap2image(src, filetype, outfile) local o = nil local tmp = os.tmpname() local tmpdir = string.match(tmp, "^(.*[\\/])") or "." - local opts = "-s" + local opts = { "-s" } if format == "latex" or format == "beamer" then -- for any format other than raw tikz we need a standalone tex file - opts = "" + opts = {} end - local tex = pandoc.pipe("argmap2tikz",{opts}, src) -- convert map to standalone tex + local tex = pandoc.pipe("argmap2tikz", opts, src) -- convert map to standalone tex if format == 'latex' or format == 'beamer' then -- for latex, just return raw tex o = tex