├── .travis.yml ├── COPYING.md ├── COPYRIGHT.md ├── README.md └── rm_tag_not_release.ipynb /.travis.yml: -------------------------------------------------------------------------------- 1 | # This .travis.yml is modified from pandoc's at https://github.com/jgm/pandoc/blob/master/.travis.yml 2 | language: generic 3 | cache: 4 | directories: 5 | - $HOME/.ghc 6 | - $HOME/.stack 7 | jobs: 8 | include: 9 | - dist: bionic 10 | addons: 11 | apt: 12 | packages: 13 | - ghc-8.10.1 14 | sources: 15 | - hvr-ghc 16 | - os: linux 17 | arch: arm64 18 | dist: bionic 19 | addons: 20 | apt: 21 | packages: 22 | - ghc 23 | - cabal-install 24 | - os: osx 25 | allow_failures: 26 | - arch: arm64 27 | before_install: 28 | # pandoc-nightly version 29 | - | 30 | printf "%s: %s\n" "pandoc-nightly version" "0.3" 31 | install: 32 | # Download and unpack the stack executable 33 | - mkdir -p ~/.local/bin && export PATH="$HOME/.local/bin:$PATH" 34 | - mkdir -p ~/temp && cd ~/temp 35 | - | 36 | if [[ "$TRAVIS_OS_NAME" == osx || "$TRAVIS_CPU_ARCH" == amd64 ]]; then 37 | wget -q "https://www.stackage.org/stack/${TRAVIS_OS_NAME}-x86_64" 38 | tar -xf "${TRAVIS_OS_NAME}-x86_64" 39 | mv stack-*-${TRAVIS_OS_NAME}-x86_64/stack ~/.local/bin 40 | else 41 | echo skip installing stack for arm64 42 | fi 43 | - | 44 | if [[ "$TRAVIS_OS_NAME" == osx ]]; then 45 | wget -q 'https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-x86_64-apple-darwin.tar.xz' 46 | tar -xf ghc-8.10.1-x86_64-apple-darwin.tar.xz 47 | cd ghc-8.10.1 48 | ./configure --prefix="$HOME/.local" 49 | make install 50 | else 51 | echo skip installing cabal if not osx 52 | fi 53 | before_script: 54 | # clone from git 55 | - mkdir ~/git 56 | - cd ~/git 57 | - git clone --depth 1 https://github.com/jgm/pandoc --branch master --single-branch 58 | - cd pandoc 59 | - git submodule update --init --recommend-shallow 60 | # get the current commit hash of pandoc 61 | - HASH=$(git rev-parse --short HEAD) 62 | # filename 63 | - | 64 | case "$TRAVIS_OS_NAME" in 65 | osx) filename=pandoc-osx-$HASH ;; 66 | linux) filename="pandoc-${TRAVIS_CPU_ARCH}-$HASH" ;; 67 | *) exit 1 ;; 68 | esac 69 | script: 70 | # build 71 | - | 72 | if [[ "$TRAVIS_OS_NAME" == osx || "$TRAVIS_CPU_ARCH" == amd64 ]]; then 73 | stack setup 74 | stack build --flag 'pandoc:embed_data_files' 75 | cd .. 76 | # path to the pandoc executable 77 | path2pandoc="$(find pandoc/.stack-work/install -type f -name pandoc)" 78 | else 79 | cabal update 80 | cabal --version 81 | cabal install cabal-install 82 | cabal install --only-dependencies 83 | cabal configure --flags="embed_data_files https" 84 | cabal build 85 | cabal install 86 | path2pandoc="$CABALDIR/bin/pandoc" 87 | fi 88 | # debug 89 | - ls -aglh "$path2pandoc" 90 | - | 91 | "$path2pandoc" -v 92 | after_success: 93 | # if it's a cron job, create git tag for GitHub Releases, only on Linux build 94 | - | 95 | if [[ "$TRAVIS_EVENT_TYPE" == cron && "$TRAVIS_OS_NAME" == linux ]]; then 96 | git config --global user.email "builds@travis-ci.com" 97 | git config --global user.name "Travis CI" 98 | export GIT_TAG="hash-$HASH" 99 | git tag "$GIT_TAG" -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER" 100 | git push --quiet https://$GH_TOKEN_SECURE@github.com/pandoc-extras/pandoc-nightly "$GIT_TAG" > /dev/null 2>&1 101 | fi 102 | # if it's a cron job, remove Draft releases on GitHub, only on macOS build 103 | # These Draft releases exists when there's a broken release from Travis 104 | - | 105 | if [[ $TRAVIS_EVENT_TYPE == 'cron' && "$TRAVIS_OS_NAME" == osx ]]; then 106 | brew update 107 | brew outdated hub || brew upgrade hub 108 | # hub expect the env var GITHUB_TOKEN and I'm too lazy to rename the one I added on Travis 109 | GITHUB_TOKEN="$GH_TOKEN_SECURE" hub release -f "%T (%S) %n" --include-drafts | grep " (draft)" | awk '{print $1}' | xargs -t -n1 hub release delete || : 110 | fi 111 | # zip pandoc binary and move to dist/ if it is the git-tag build (GitHub Releases) 112 | - | 113 | if [[ ! -z "$TRAVIS_TAG" ]]; then 114 | mkdir -p $filename 115 | mv $path2pandoc $filename 116 | zip $filename.zip $filename/pandoc 117 | mkdir -p dist 118 | mv $filename.zip dist/ 119 | fi 120 | # debug 121 | - ls -l dist/ 122 | deploy: 123 | provider: releases 124 | token: "$GH_TOKEN_SECURE" 125 | file_glob: true 126 | file: "dist/*" 127 | on: 128 | tags: true 129 | env: 130 | global: 131 | secure: PDNr60bZ/drP2nEkW+8mP9DNPONjElxMrxLSsVtXcDLJbDZPmyFahgiHmYERYiUGXQmzuyQbqQNBydFnHUbeRdZ+owLGzTIv8RzZ1SX+7OKZTwc38cJV3nWq3/F57DXsI32IW21RU1JN0HjCi33X4pDlrz597D78LKS3wRAREgxYMcq1FO+GtQ8B7NdLgFni0g94GiIUOyDoAut1yh43V7LoMtt6izQFJFyENUsaHl6xhhdxBoE6qnNhwP+CxscsCf+keezwCFgjuV+cwmxDhspY5Kx/bPfN0c2/Dwgv/nq+JjsbvVYJUjg/gHvg2dlwkGZKXIn8YmI492UwYxSOJ3TgLktdEgrkjRDPGwRvGpkqkZcZg65BEaTNzb/mj+kqd1sGo3NAfuDP8ArqJrYM2G4qfD2yIDKsFSMnIOH+6g6jmTEVPQt9yA2a3ZyUrXzdgs2i/AtsmUB4YYWHcIjcsjmdGZm6CgG3BMIMUmNuWZk9Ad3YEibd6raZ52RuTkICm0UQjCckg4QG10gS1ZYTTLyJle8f2HWxZZixBGfJQMmJsfn8jFoGsl9SKIseQ3VtEnmsHXSqW9tADFQ9+3n7wiCe+3mUaBVbKhKs6LCEf+oHi/nnkOSbPePdd43gBx3u85dww7jwoE5zDU22zWEBTa3wLztZfHAut8BQ5bYIeXw= 132 | -------------------------------------------------------------------------------- /COPYING.md: -------------------------------------------------------------------------------- 1 | ### GNU GENERAL PUBLIC LICENSE 2 | 3 | Version 2, June 1991 4 | 5 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 6 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 7 | 8 | Everyone is permitted to copy and distribute verbatim copies 9 | of this license document, but changing it is not allowed. 10 | 11 | ### Preamble 12 | 13 | The licenses for most software are designed to take away your freedom 14 | to share and change it. By contrast, the GNU General Public License is 15 | intended to guarantee your freedom to share and change free 16 | software--to make sure the software is free for all its users. This 17 | General Public License applies to most of the Free Software 18 | Foundation's software and to any other program whose authors commit to 19 | using it. (Some other Free Software Foundation software is covered by 20 | the GNU Lesser General Public License instead.) You can apply it to 21 | your programs, too. 22 | 23 | When we speak of free software, we are referring to freedom, not 24 | price. Our General Public Licenses are designed to make sure that you 25 | have the freedom to distribute copies of free software (and charge for 26 | this service if you wish), that you receive source code or can get it 27 | if you want it, that you can change the software or use pieces of it 28 | in new free programs; and that you know you can do these things. 29 | 30 | To protect your rights, we need to make restrictions that forbid 31 | anyone to deny you these rights or to ask you to surrender the rights. 32 | These restrictions translate to certain responsibilities for you if 33 | you distribute copies of the software, or if you modify it. 34 | 35 | For example, if you distribute copies of such a program, whether 36 | gratis or for a fee, you must give the recipients all the rights that 37 | you have. You must make sure that they, too, receive or can get the 38 | source code. And you must show them these terms so they know their 39 | rights. 40 | 41 | We protect your rights with two steps: (1) copyright the software, and 42 | (2) offer you this license which gives you legal permission to copy, 43 | distribute and/or modify the software. 44 | 45 | Also, for each author's protection and ours, we want to make certain 46 | that everyone understands that there is no warranty for this free 47 | software. If the software is modified by someone else and passed on, 48 | we want its recipients to know that what they have is not the 49 | original, so that any problems introduced by others will not reflect 50 | on the original authors' reputations. 51 | 52 | Finally, any free program is threatened constantly by software 53 | patents. We wish to avoid the danger that redistributors of a free 54 | program will individually obtain patent licenses, in effect making the 55 | program proprietary. To prevent this, we have made it clear that any 56 | patent must be licensed for everyone's free use or not licensed at 57 | all. 58 | 59 | The precise terms and conditions for copying, distribution and 60 | modification follow. 61 | 62 | ### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 63 | 64 | **0.** This License applies to any program or other work which 65 | contains a notice placed by the copyright holder saying it may be 66 | distributed under the terms of this General Public License. The 67 | "Program", below, refers to any such program or work, and a "work 68 | based on the Program" means either the Program or any derivative work 69 | under copyright law: that is to say, a work containing the Program or 70 | a portion of it, either verbatim or with modifications and/or 71 | translated into another language. (Hereinafter, translation is 72 | included without limitation in the term "modification".) Each licensee 73 | is addressed as "you". 74 | 75 | Activities other than copying, distribution and modification are not 76 | covered by this License; they are outside its scope. The act of 77 | running the Program is not restricted, and the output from the Program 78 | is covered only if its contents constitute a work based on the Program 79 | (independent of having been made by running the Program). Whether that 80 | is true depends on what the Program does. 81 | 82 | **1.** You may copy and distribute verbatim copies of the Program's 83 | source code as you receive it, in any medium, provided that you 84 | conspicuously and appropriately publish on each copy an appropriate 85 | copyright notice and disclaimer of warranty; keep intact all the 86 | notices that refer to this License and to the absence of any warranty; 87 | and give any other recipients of the Program a copy of this License 88 | along with the Program. 89 | 90 | You may charge a fee for the physical act of transferring a copy, and 91 | you may at your option offer warranty protection in exchange for a 92 | fee. 93 | 94 | **2.** You may modify your copy or copies of the Program or any 95 | portion of it, thus forming a work based on the Program, and copy and 96 | distribute such modifications or work under the terms of Section 1 97 | above, provided that you also meet all of these conditions: 98 | 99 | 100 | **a)** You must cause the modified files to carry prominent notices 101 | stating that you changed the files and the date of any change. 102 | 103 | 104 | **b)** You must cause any work that you distribute or publish, that in 105 | whole or in part contains or is derived from the Program or any part 106 | thereof, to be licensed as a whole at no charge to all third parties 107 | under the terms of this License. 108 | 109 | 110 | **c)** If the modified program normally reads commands interactively 111 | when run, you must cause it, when started running for such interactive 112 | use in the most ordinary way, to print or display an announcement 113 | including an appropriate copyright notice and a notice that there is 114 | no warranty (or else, saying that you provide a warranty) and that 115 | users may redistribute the program under these conditions, and telling 116 | the user how to view a copy of this License. (Exception: if the 117 | Program itself is interactive but does not normally print such an 118 | announcement, your work based on the Program is not required to print 119 | an announcement.) 120 | 121 | These requirements apply to the modified work as a whole. If 122 | identifiable sections of that work are not derived from the Program, 123 | and can be reasonably considered independent and separate works in 124 | themselves, then this License, and its terms, do not apply to those 125 | sections when you distribute them as separate works. But when you 126 | distribute the same sections as part of a whole which is a work based 127 | on the Program, the distribution of the whole must be on the terms of 128 | this License, whose permissions for other licensees extend to the 129 | entire whole, and thus to each and every part regardless of who wrote 130 | it. 131 | 132 | Thus, it is not the intent of this section to claim rights or contest 133 | your rights to work written entirely by you; rather, the intent is to 134 | exercise the right to control the distribution of derivative or 135 | collective works based on the Program. 136 | 137 | In addition, mere aggregation of another work not based on the Program 138 | with the Program (or with a work based on the Program) on a volume of 139 | a storage or distribution medium does not bring the other work under 140 | the scope of this License. 141 | 142 | **3.** You may copy and distribute the Program (or a work based on it, 143 | under Section 2) in object code or executable form under the terms of 144 | Sections 1 and 2 above provided that you also do one of the following: 145 | 146 | 147 | **a)** Accompany it with the complete corresponding machine-readable 148 | source code, which must be distributed under the terms of Sections 1 149 | and 2 above on a medium customarily used for software interchange; or, 150 | 151 | 152 | **b)** Accompany it with a written offer, valid for at least three 153 | years, to give any third party, for a charge no more than your cost of 154 | physically performing source distribution, a complete machine-readable 155 | copy of the corresponding source code, to be distributed under the 156 | terms of Sections 1 and 2 above on a medium customarily used for 157 | software interchange; or, 158 | 159 | 160 | **c)** Accompany it with the information you received as to the offer 161 | to distribute corresponding source code. (This alternative is allowed 162 | only for noncommercial distribution and only if you received the 163 | program in object code or executable form with such an offer, in 164 | accord with Subsection b above.) 165 | 166 | The source code for a work means the preferred form of the work for 167 | making modifications to it. For an executable work, complete source 168 | code means all the source code for all modules it contains, plus any 169 | associated interface definition files, plus the scripts used to 170 | control compilation and installation of the executable. However, as a 171 | special exception, the source code distributed need not include 172 | anything that is normally distributed (in either source or binary 173 | form) with the major components (compiler, kernel, and so on) of the 174 | operating system on which the executable runs, unless that component 175 | itself accompanies the executable. 176 | 177 | If distribution of executable or object code is made by offering 178 | access to copy from a designated place, then offering equivalent 179 | access to copy the source code from the same place counts as 180 | distribution of the source code, even though third parties are not 181 | compelled to copy the source along with the object code. 182 | 183 | **4.** You may not copy, modify, sublicense, or distribute the Program 184 | except as expressly provided under this License. Any attempt otherwise 185 | to copy, modify, sublicense or distribute the Program is void, and 186 | will automatically terminate your rights under this License. However, 187 | parties who have received copies, or rights, from you under this 188 | License will not have their licenses terminated so long as such 189 | parties remain in full compliance. 190 | 191 | **5.** You are not required to accept this License, since you have not 192 | signed it. However, nothing else grants you permission to modify or 193 | distribute the Program or its derivative works. These actions are 194 | prohibited by law if you do not accept this License. Therefore, by 195 | modifying or distributing the Program (or any work based on the 196 | Program), you indicate your acceptance of this License to do so, and 197 | all its terms and conditions for copying, distributing or modifying 198 | the Program or works based on it. 199 | 200 | **6.** Each time you redistribute the Program (or any work based on 201 | the Program), the recipient automatically receives a license from the 202 | original licensor to copy, distribute or modify the Program subject to 203 | these terms and conditions. You may not impose any further 204 | restrictions on the recipients' exercise of the rights granted herein. 205 | You are not responsible for enforcing compliance by third parties to 206 | this License. 207 | 208 | **7.** If, as a consequence of a court judgment or allegation of 209 | patent infringement or for any other reason (not limited to patent 210 | issues), conditions are imposed on you (whether by court order, 211 | agreement or otherwise) that contradict the conditions of this 212 | License, they do not excuse you from the conditions of this License. 213 | If you cannot distribute so as to satisfy simultaneously your 214 | obligations under this License and any other pertinent obligations, 215 | then as a consequence you may not distribute the Program at all. For 216 | example, if a patent license would not permit royalty-free 217 | redistribution of the Program by all those who receive copies directly 218 | or indirectly through you, then the only way you could satisfy both it 219 | and this License would be to refrain entirely from distribution of the 220 | Program. 221 | 222 | If any portion of this section is held invalid or unenforceable under 223 | any particular circumstance, the balance of the section is intended to 224 | apply and the section as a whole is intended to apply in other 225 | circumstances. 226 | 227 | It is not the purpose of this section to induce you to infringe any 228 | patents or other property right claims or to contest validity of any 229 | such claims; this section has the sole purpose of protecting the 230 | integrity of the free software distribution system, which is 231 | implemented by public license practices. Many people have made 232 | generous contributions to the wide range of software distributed 233 | through that system in reliance on consistent application of that 234 | system; it is up to the author/donor to decide if he or she is willing 235 | to distribute software through any other system and a licensee cannot 236 | impose that choice. 237 | 238 | This section is intended to make thoroughly clear what is believed to 239 | be a consequence of the rest of this License. 240 | 241 | **8.** If the distribution and/or use of the Program is restricted in 242 | certain countries either by patents or by copyrighted interfaces, the 243 | original copyright holder who places the Program under this License 244 | may add an explicit geographical distribution limitation excluding 245 | those countries, so that distribution is permitted only in or among 246 | countries not thus excluded. In such case, this License incorporates 247 | the limitation as if written in the body of this License. 248 | 249 | **9.** The Free Software Foundation may publish revised and/or new 250 | versions of the General Public License from time to time. Such new 251 | versions will be similar in spirit to the present version, but may 252 | differ in detail to address new problems or concerns. 253 | 254 | Each version is given a distinguishing version number. If the Program 255 | specifies a version number of this License which applies to it and 256 | "any later version", you have the option of following the terms and 257 | conditions either of that version or of any later version published by 258 | the Free Software Foundation. If the Program does not specify a 259 | version number of this License, you may choose any version ever 260 | published by the Free Software Foundation. 261 | 262 | **10.** If you wish to incorporate parts of the Program into other 263 | free programs whose distribution conditions are different, write to 264 | the author to ask for permission. For software which is copyrighted by 265 | the Free Software Foundation, write to the Free Software Foundation; 266 | we sometimes make exceptions for this. Our decision will be guided by 267 | the two goals of preserving the free status of all derivatives of our 268 | free software and of promoting the sharing and reuse of software 269 | generally. 270 | 271 | **NO WARRANTY** 272 | 273 | **11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO 274 | WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 275 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 276 | OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY 277 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 278 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 279 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 280 | PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME 281 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 282 | 283 | **12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 284 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 285 | AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU 286 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 287 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 288 | PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 289 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 290 | FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF 291 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 292 | DAMAGES. 293 | 294 | ### END OF TERMS AND CONDITIONS 295 | 296 | ### How to Apply These Terms to Your New Programs 297 | 298 | If you develop a new program, and you want it to be of the greatest 299 | possible use to the public, the best way to achieve this is to make it 300 | free software which everyone can redistribute and change under these 301 | terms. 302 | 303 | To do so, attach the following notices to the program. It is safest to 304 | attach them to the start of each source file to most effectively 305 | convey the exclusion of warranty; and each file should have at least 306 | the "copyright" line and a pointer to where the full notice is found. 307 | 308 | one line to give the program's name and an idea of what it does. 309 | Copyright (C) yyyy name of author 310 | 311 | This program is free software; you can redistribute it and/or 312 | modify it under the terms of the GNU General Public License 313 | as published by the Free Software Foundation; either version 2 314 | of the License, or (at your option) any later version. 315 | 316 | This program is distributed in the hope that it will be useful, 317 | but WITHOUT ANY WARRANTY; without even the implied warranty of 318 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 319 | GNU General Public License for more details. 320 | 321 | You should have received a copy of the GNU General Public License 322 | along with this program; if not, write to the Free Software 323 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 324 | 325 | Also add information on how to contact you by electronic and paper 326 | mail. 327 | 328 | If the program is interactive, make it output a short notice like this 329 | when it starts in an interactive mode: 330 | 331 | Gnomovision version 69, Copyright (C) year name of author 332 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details 333 | type `show w'. This is free software, and you are welcome 334 | to redistribute it under certain conditions; type `show c' 335 | for details. 336 | 337 | The hypothetical commands \`show w' and \`show c' should show the 338 | appropriate parts of the General Public License. Of course, the 339 | commands you use may be called something other than \`show w' and 340 | \`show c'; they could even be mouse-clicks or menu items--whatever 341 | suits your program. 342 | 343 | You should also get your employer (if you work as a programmer) or 344 | your school, if any, to sign a "copyright disclaimer" for the program, 345 | if necessary. Here is a sample; alter the names: 346 | 347 | Yoyodyne, Inc., hereby disclaims all copyright 348 | interest in the program `Gnomovision' 349 | (which makes passes at compilers) written 350 | by James Hacker. 351 | 352 | signature of Ty Coon, 1 April 1989 353 | Ty Coon, President of Vice 354 | 355 | This General Public License does not permit incorporating your program 356 | into proprietary programs. If your program is a subroutine library, 357 | you may consider it more useful to permit linking proprietary 358 | applications with the library. If this is what you want to do, use the 359 | [GNU Lesser General Public 360 | License](http://www.gnu.org/licenses/lgpl.html) instead of this 361 | License. -------------------------------------------------------------------------------- /COPYRIGHT.md: -------------------------------------------------------------------------------- 1 | Pandoc 2 | Copyright (C) 2006-2016 John MacFarlane 3 | 4 | This code is released under the [GPL], version 2 or later: 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | 20 | The GNU General Public License is available in the file COPYING.md in 21 | the source distribution. On Debian systems, the complete text of the 22 | GPL can be found in `/usr/share/common-licenses/GPL`. 23 | 24 | [GPL]: http://www.gnu.org/copyleft/gpl.html 25 | 26 | Pandoc's complete source code is available from the [Pandoc home page]. 27 | 28 | [Pandoc home page]: http://pandoc.org 29 | 30 | Pandoc includes some code from other authors. The copyright and license 31 | statements for these sources are included below. All are GPL-compatible 32 | licenses. 33 | 34 | ---------------------------------------------------------------------- 35 | src/Text/Pandoc/Writers/Texinfo.hs 36 | Copyright (C) 2008-2015 John MacFarlane and Peter Wang 37 | 38 | Released under the GNU General Public License version 2 or later. 39 | 40 | ---------------------------------------------------------------------- 41 | src/Text/Pandoc/Writers/OpenDocument.hs 42 | Copyright (C) 2008-2015 Andrea Rossato and John MacFarlane 43 | 44 | Released under the GNU General Public License version 2 or later. 45 | 46 | ---------------------------------------------------------------------- 47 | src/Text/Pandoc/Writers/Org.hs 48 | Copyright (C) 2010-2015 Puneeth Chaganti and John MacFarlane 49 | 50 | Released under the GNU General Public License version 2 or later. 51 | 52 | ---------------------------------------------------------------------- 53 | src/Text/Pandoc/Readers/Textile.hs 54 | Copyright (C) 2010-2015 Paul Rivier and John MacFarlane 55 | 56 | Released under the GNU General Public License version 2 or later. 57 | 58 | ---------------------------------------------------------------------- 59 | src/Text/Pandoc/Readers/Org.hs 60 | tests/Tests/Readers/Org.hs 61 | Copyright (C) 2014-2015 Albert Krewinkel 62 | 63 | Released under the GNU General Public License version 2 or later. 64 | 65 | ---------------------------------------------------------------------- 66 | data/LaTeXMathML.js 67 | Adapted by Jeff Knisely and Douglas Woodall from 68 | ASCIIMathML.js v. 1.4.7 69 | Copyright (C) 2005 Peter Jipsen 70 | 71 | Released under the GNU General Public License version 2 or later. 72 | 73 | ---------------------------------------------------------------------- 74 | data/MathMLinHTML.js 75 | Copyright (C) 2004 Peter Jipsen http://www.chapman.edu/~jipsen 76 | 77 | Released under the GNU General Public License version 2 or later. 78 | 79 | ------------------------------------------------------------------------ 80 | The dzslides template contains javascript and CSS from Paul Rouget's 81 | dzslides template. 82 | http://github.com/paulrouget/dzslides 83 | 84 | Released under the Do What the Fuck You Want To Public License. 85 | 86 | ------------------------------------------------------------------------ 87 | Pandoc embeds a lua interpreter (via hslua). 88 | 89 | Copyright © 1994–2015 Lua.org, PUC-Rio. 90 | 91 | Permission is hereby granted, free of charge, to any person obtaining 92 | a copy of this software and associated documentation files (the 93 | "Software"), to deal in the Software without restriction, including 94 | without limitation the rights to use, copy, modify, merge, publish, 95 | distribute, sublicense, and/or sell copies of the Software, and to 96 | permit persons to whom the Software is furnished to do so, subject to 97 | the following conditions: 98 | 99 | The above copyright notice and this permission notice shall be 100 | included in all copies or substantial portions of the Software. 101 | 102 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 103 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 104 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 105 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 106 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 107 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 108 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 109 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/pandoc-extras/pandoc-nightly.svg?branch=master)](https://travis-ci.org/pandoc-extras/pandoc-nightly) 2 | 3 | # Description 4 | 5 | This repository provides nightly builds for [pandoc](https://github.com/jgm/pandoc/). **The main purpose is for testing a potential bug before filing an issue.** See more below. 6 | (Or if you want to try the latest features of pandoc. But remember, nightly is not even beta. If you choose to use it, **you are on your own**.) 7 | 8 | Go to [the releases page](https://github.com/pandoc-extras/pandoc-nightly/releases/latest) to download pandoc for your platform (`pandoc-amd64-...` is for Linux). 9 | Only the pandoc executables are provided. Once you downloaded it, you can unzip it and run by specifying the absolute path of the pandoc executables explicitly: 10 | 11 | ```bash 12 | # For example: 13 | ~/Downloads/pandoc-osx-5729f1f2eaf1665be3fcbf92917503bdd15d1995/pandoc ... # your usual pandoc options here 14 | ``` 15 | 16 | For Windows users, the `.zip` is mirrored from [the official nightly build from appveyor](https://ci.appveyor.com/project/jgm/pandoc/build/artifacts) for convenience. 17 | 18 | # Bug Report on [jgm/pandoc](https://github.com/jgm/pandoc) 19 | 20 | This part describe the intended use of pandoc-nightly in details. 21 | 22 | Often time we see bug reports on very outdated versions of pandoc opened in [jgm/pandoc](https://github.com/jgm/pandoc). The steps to take before a bug report should be this: 23 | 24 | 1. Install the latest stable release of pandoc. 25 | 26 | - If (1) is not an option, use [pandoc-portable](https://github.com/pandoc-extras/pandoc-portable) and download the latest stable release in zip. 27 | 28 | 2. If the bug still persists, go to [pandoc-nightly](https://github.com/pandoc-extras/pandoc-nightly) to download the latest available release in zip, which is built from the latest commit in [the master branch of jgm/pandoc](https://github.com/jgm/pandoc). 29 | 30 | Only after checking the bug against both version (latest stable and latest master) should you file a bug report. 31 | 32 | Note that **do not file bug report that's only found in pandoc-nightly**. It is completely normal and that's why it's called nightly. 33 | 34 | # Versioning 35 | 36 | The commit hash of the pandoc's latest commit is used as the version here, as you can see in the [releases page](https://github.com/pandoc-extras/pandoc-portable/releases). The version follows the pattern of `hash-`. 37 | 38 | For example, version (git tag) `hash-1dc4b3925d96e26b89a1a30f36ab809662e283ad` uses the source from . The `.zip` also follows the same pattern, so you can easily traced it back to which commit the binary is compiled against. 39 | 40 | The versions of the script and travis setup in this repository will be in the `before_install` section of the `.travis.yml`. 41 | 42 | **Caveat**: if you run `/pandoc --version`, it will show **the version of the latest stable release instead** (because this is coded in the source code of pandoc). There's nothing much I can do about it, but given these nightly builds are provided in `.zip` without an installer, it should be hard to not remember it is not your usual stable installation. 43 | 44 | # License 45 | 46 | The original license from pandoc is copied here, which is in GPLv2+. 47 | 48 | # Potential Improvements 49 | 50 | If you feel like improving any of these, please feel free to make a pull request. 51 | 52 | ## Versioning can be off by up to an hour 53 | 54 | The hash uses in these 3 instances: 55 | 56 | 1. git tag version (as shown in the [releases page](https://github.com/pandoc-extras/pandoc-portable/releases)), 57 | 2. in the names of the `pandoc-osx|amd64-...` binaries, and 58 | 3. in the name of the `pandoc-windows-...` binaries 59 | 60 | might not agree. 61 | 62 | Technically, 63 | 64 | 1. a daily Travis cron job triggers the creation of the git tag in (1), using the hash of the latest pandoc commit in this build. 65 | 2. the new git tag triggers a new Travis job, at the time of the job, it creates (2), where the macOS and Linux build runs in parallel. Each of the hash in the name of the `pandoc-osx|amd64-...` binaries are the hash of the latest pandoc commit in their respective build. 66 | 3. In addition, the Appveyor's artifacts are mirrored in the Linux build, and uses the hash found in that Linux build instead. 67 | 68 | In short, only the hashes in the (2) is guaranteed to be correct. 69 | 70 | In practice, these different versions (commit hashes) probably differs by at most an hour. 71 | 72 | ## Git submodule 73 | 74 | May be a better way to handle this is to add pandoc as a git submodule to this repository. A script in Travis can be added to update the submodule and auto-commit it to the project. Then there's a clear history of commits in this repository reflecting on the commits used from pandoc. 75 | 76 | ## Travis Cron Job 77 | 78 | Note to anyone who make a commit: 79 | 80 | >Because cron jobs build the latest commit to a particular branch, if that commit message includes `[ci skip]` or `[skip ci]` the cron job will skip that build. From [Cron Jobs - Travis CI](https://docs.travis-ci.com/user/cron-jobs/). 81 | 82 | i.e. remember not to use these keywords in your commit, otherwise if the latest commit seen by the cron job includes these keywords, the cron job will always be skipped indefinitely (until a new commit). 83 | 84 | e.g. cron job on 2017-01-21 is skipped because of commit b18110a. 85 | -------------------------------------------------------------------------------- /rm_tag_not_release.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "from bs4 import BeautifulSoup" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "from datetime import datetime" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": null, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [ 27 | "import github3" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": null, 33 | "metadata": {}, 34 | "outputs": [], 35 | "source": [ 36 | "from lxml import html" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": null, 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "import numpy as np" 46 | ] 47 | }, 48 | { 49 | "cell_type": "code", 50 | "execution_count": null, 51 | "metadata": {}, 52 | "outputs": [], 53 | "source": [ 54 | "from pathlib import Path" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "metadata": {}, 61 | "outputs": [], 62 | "source": [ 63 | "import requests" 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": null, 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [ 72 | "with open(Path('/Users/kolen/gh_token'), 'r') as f:\n", 73 | " token, userid = [line.strip() for line in f.readlines()]" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": null, 79 | "metadata": {}, 80 | "outputs": [], 81 | "source": [ 82 | "gh = github3.login(token=token)" 83 | ] 84 | }, 85 | { 86 | "cell_type": "code", 87 | "execution_count": null, 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [ 91 | "repo = gh.repository('pandoc-extras', 'pandoc-nightly')" 92 | ] 93 | }, 94 | { 95 | "cell_type": "code", 96 | "execution_count": null, 97 | "metadata": {}, 98 | "outputs": [], 99 | "source": [ 100 | "tag_names = {release.tag_name for release in repo.releases()}" 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": null, 106 | "metadata": {}, 107 | "outputs": [], 108 | "source": [ 109 | "len(tag_names)" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": null, 115 | "metadata": {}, 116 | "outputs": [], 117 | "source": [ 118 | "tag_names2 = {tag.name: tag for tag in repo.tags()}" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": null, 124 | "metadata": {}, 125 | "outputs": [], 126 | "source": [ 127 | "len(tag_names2)" 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": null, 133 | "metadata": {}, 134 | "outputs": [], 135 | "source": [ 136 | "assert tag_names.issubset(tag_names2)" 137 | ] 138 | }, 139 | { 140 | "cell_type": "code", 141 | "execution_count": null, 142 | "metadata": {}, 143 | "outputs": [], 144 | "source": [ 145 | "surplus_tags = tag_names2.keys() - tag_names" 146 | ] 147 | }, 148 | { 149 | "cell_type": "code", 150 | "execution_count": null, 151 | "metadata": {}, 152 | "outputs": [], 153 | "source": [ 154 | "len(surplus_tags)" 155 | ] 156 | }, 157 | { 158 | "cell_type": "code", 159 | "execution_count": null, 160 | "metadata": {}, 161 | "outputs": [], 162 | "source": [ 163 | "urls = np.array([\n", 164 | " f'https://github.com/pandoc-extras/pandoc-nightly/releases/tag/{tag}'\n", 165 | " for tag in surplus_tags\n", 166 | "])" 167 | ] 168 | }, 169 | { 170 | "cell_type": "code", 171 | "execution_count": null, 172 | "metadata": {}, 173 | "outputs": [], 174 | "source": [ 175 | "result = np.array(\n", 176 | " [\n", 177 | " datetime.strptime(\n", 178 | " BeautifulSoup(\n", 179 | " requests.get(url).content,\n", 180 | " \"html.parser\"\n", 181 | " ).find_all('relative-time')[0].contents[0],\n", 182 | " '%b %d, %Y'\n", 183 | " )\n", 184 | " for url in urls\n", 185 | " ],\n", 186 | " dtype=np.datetime64\n", 187 | ")" 188 | ] 189 | }, 190 | { 191 | "cell_type": "code", 192 | "execution_count": null, 193 | "metadata": {}, 194 | "outputs": [], 195 | "source": [ 196 | "surplus_tags_obj = [value for key, value in tag_names2.items() if key in surplus_tags]" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": null, 202 | "metadata": {}, 203 | "outputs": [], 204 | "source": [ 205 | "surplus_tags" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": null, 211 | "metadata": {}, 212 | "outputs": [], 213 | "source": [ 214 | "for tag in surplus_tags:\n", 215 | " !git tag -d {tag} && git push origin :{tag}" 216 | ] 217 | } 218 | ], 219 | "metadata": { 220 | "kernelspec": { 221 | "display_name": "all3-intel", 222 | "language": "python", 223 | "name": "all3-intel" 224 | }, 225 | "language_info": { 226 | "codemirror_mode": { 227 | "name": "ipython", 228 | "version": 3 229 | }, 230 | "file_extension": ".py", 231 | "mimetype": "text/x-python", 232 | "name": "python", 233 | "nbconvert_exporter": "python", 234 | "pygments_lexer": "ipython3", 235 | "version": "3.6.5" 236 | } 237 | }, 238 | "nbformat": 4, 239 | "nbformat_minor": 2 240 | } 241 | --------------------------------------------------------------------------------