org-license.el 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. ;;; org-license.el --- Add a license to your org files
  2. ;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
  3. ;; Author: David Arroyo Menéndez <davidam@es.gnu.org>
  4. ;; Keywords: licenses, creative commons
  5. ;; Homepage: https://orgmode.org
  6. ;;
  7. ;; This file is not part of GNU Emacs, yet.
  8. ;;
  9. ;; GNU Emacs is free software: you can redistribute it and/or modify
  10. ;; it under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation, either version 3 of the License, or
  12. ;; (at your option) any later version.
  13. ;; GNU Emacs is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;
  21. ;;; Commentary:
  22. ;; This file implements functions to add a license fast in org files.
  23. ;; Org-mode doesn't load this module by default - if this is not what
  24. ;; you want, configure the variable `org-modules'. Thanks to #emacs-es
  25. ;; irc channel for your support.
  26. ;;; Code:
  27. ;;
  28. ;;
  29. ;; You can download the images from http://www.davidam/img/licenses.tar.gz
  30. ;;
  31. ;;; CHANGELOG:
  32. ;; v 0.2 - add public domain functions
  33. ;; v 0.1 - Initial release
  34. (defvar org-license-images-directory "")
  35. (defun org-license-cc-by (language)
  36. (interactive "MLanguage ( br | ca | de | en | es | eo | eu | fi | fr | gl | it | jp | nl | pt ): " language)
  37. (cond ((equal language "br")
  38. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/br/deed.pt_BR")
  39. (insert (concat "* Licença
  40. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição 3.0 Brasil]]\n")))
  41. ((equal language "ca")
  42. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/es/deed.ca")
  43. (insert (concat "* Licència
  44. El text està disponible sota la [[" org-license-cc-url "][Reconeixement 3.0 Espanya]]\n")))
  45. ((equal language "de")
  46. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/de/deed.de")
  47. (insert (concat "* Lizenz
  48. Dieses Werk bzw. Inhalt steht unter einer [[" org-license-cc-url "][Lizenz Creative Commons Namensnennung 3.0 Deutschland]]\n")))
  49. ((equal language "eo")
  50. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/eo/deed.eo")
  51. (insert (concat "* Licenco
  52. Ĉi tiu verko estas disponebla laŭ la permesilo [[" org-license-cc-url "][Krea Komunaĵo Atribuite 3.0 Neadaptita]]\n")))
  53. ((equal language "es")
  54. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/es/deed.es")
  55. (insert (concat "* Licencia
  56. Este documento está bajo una [[" org-license-cc-url "][Licencia Creative Commons Atribución 3.0 España]]\n")))
  57. ((equal language "eu")
  58. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/es/deed.eu")
  59. (insert (concat "* Licenzua
  60. Testua [[" org-license-cc-url "][Aitortu 3.0 Espainia]] lizentziari jarraituz erabil daiteke\n")))
  61. ((equal language "fi")
  62. (setq org-license-cc-url "https://creativecommons.org/licenses/by/1.0/fi/deed.fi")
  63. (insert (concat "* Lisenssi
  64. Teksti on saatavilla [[" org-license-cc-url "][Nimeä 1.0 Suomi]] lisenssillä\n")))
  65. ((equal language "fr")
  66. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/fr/deed.fr")
  67. (insert (concat "* Licence
  68. Ce(tte) œuvre est mise à disposition selon les termes de la [[" org-license-cc-url "][Licence Creative Commons Attribution 3.0 France]]\n")))
  69. ((equal language "gl")
  70. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/es/deed.gl")
  71. (insert (concat "* Licenza
  72. Todo o texto está dispoñible baixo a [[" org-license-cc-url "][licenza Creative Commons recoñecemento compartir igual 3.0]].\n")))
  73. ((equal language "it")
  74. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/it/deed.it")
  75. (insert (concat "* Licenza
  76. Quest'opera e distribuita con Licenza [[" org-license-cc-url "][Licenza Creative Commons Attribuzione 3.0 Italia]]\n")))
  77. ((equal language "jp")
  78. (setq org-license-cc-url "https://creativecommons.org/licenses/by/2.1/jp/deed.en")
  79. (insert (concat "* ライセンス
  80. この文書は [[" org-license-cc-url "][Creative Commons Attribution 2.1 ]] ライセンスの下である\n")))
  81. ((equal language "nl")
  82. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/nl/deed.nl")
  83. (insert (concat "* Licentie
  84. Dit werk is valt onder een [[" org-license-cc-url "][Creative Commons Naamsvermelding 3.0 Nederland]]\n")))
  85. ((equal language "pt")
  86. (setq org-license-cc-url "https://creativecommons.org/licenses/by/3.0/pt/deed.pt")
  87. (insert (concat "* Licença
  88. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição 3.0 Portugal]]\n")))
  89. (t
  90. (setq org-license-cc-url "https://creativecommons.org/licenses/by/4.0/deed")
  91. (concat (insert "* License
  92. This document is under a [[" org-license-cc-url "][Creative Commons Attribution 4.0 International]]\n"))))
  93. (if (string= "" org-license-images-directory)
  94. (insert (concat "\n[[" org-license-cc-url "][file:https://i.creativecommons.org/l/by/3.0/80x15.png]]\n"))
  95. (insert (concat "\n[[" org-license-cc-url "][file:" org-license-images-directory "/by/3.0/80x15.png]]\n"))))
  96. (defun org-license-cc-by-sa (language)
  97. (interactive "MLanguage ( br | ca | de | en | es | eu | fi | fr | it | jp | nl | pt ): " language)
  98. (cond ((equal language "br")
  99. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/br/deed.pt_BR")
  100. (concat (insert "* Licença
  101. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Compartil ha Igual 3.0 Brasil]]\n")))
  102. ((equal language "ca")
  103. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/es/deed.ca")
  104. (insert (concat "* Licència
  105. El text està disponible sota la [[" org-license-cc-url "][Reconeixement-CompartirIgual 3.0 Espanya]]\n")))
  106. ((equal language "de")
  107. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/de/deed.de")
  108. (insert (concat "* Lizenz
  109. Dieses Werk bzw. Inhalt steht unter einer [[" org-license-cc-url "][Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland]]\n")))
  110. ((equal language "es")
  111. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/es/deed.es")
  112. (concat (insert "* Licencia
  113. Este documento está bajo una [[" org-license-cc-url "][Licencia Creative Commons Atribución Compartir por Igual 3.0 España]]\n")))
  114. ((equal language "eu")
  115. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/es/deed.eu")
  116. (concat (insert "* Licenzua
  117. Testua [[" org-license-cc-url "][Aitortu-PartekatuBerdin 3.0 Espainia]] lizentziari jarraituz erabil daiteke\n")))
  118. ((equal language "fi")
  119. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/1.0/fi/deed.fi")
  120. (insert (concat "* Lisenssi
  121. Teksti on saatavilla [[" org-license-cc-url "][Nimeä-JaaSamoin 1.0 Suomi]] lisenssillä\n")))
  122. ((equal language "fr")
  123. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/fr/deed.fr")
  124. (concat (insert "* Licence
  125. Ce(tte) œuvre est mise à disposition selon les termes de la [[" org-license-cc-url "][Licence Creative Commons Attribution - Partage dans les Mêmes Conditions 3.0 France]]\n")))
  126. ((equal language "gl")
  127. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/es/deed.gl")
  128. (insert (concat "* Licenza
  129. Todo o texto está dispoñible baixo a [[" org-license-cc-url "][licenza Creative Commons recoñecemento compartir igual 3.0]].\n")))
  130. ((equal language "it")
  131. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/it/deed.it")
  132. (insert (concat "* Licenza
  133. Quest'opera e distribuita con Licenza [[" org-license-cc-url "][Licenza Creative Commons Attribuzione - Condividi allo stesso modo 3.0 Italia]]\n")))
  134. ((equal language "jp")
  135. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/2.1/jp/deed.en")
  136. (insert (concat "* ライセンス
  137. この文書は、[[" org-license-cc-url "][Creative Commons Attribution 2.1 ]] ライセンスの下である\n")))
  138. ((equal language "nl")
  139. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/nl/deed.nl")
  140. (insert (concat "* Licentie
  141. Dit werk is valt onder een [[" org-license-cc-url "][Creative Commons Naamsvermelding Gelijk Delen 3.0 Nederland]]\n")))
  142. ((equal language "pt")
  143. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/3.0/pt/deed.pt")
  144. (insert (concat "* Licença
  145. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição-CompartilhaIgual 3.0 Portugal]]\n")))
  146. (t
  147. (setq org-license-cc-url "https://creativecommons.org/licenses/by-sa/4.0/deed")
  148. (insert (concat "* License
  149. This document is under a [[" org-license-cc-url "][Creative Commons Attribution-ShareAlike 4.0 International]]\n"))))
  150. (if (string= "" org-license-images-directory)
  151. (insert (concat "\n[[" org-license-cc-url "][file:https://i.creativecommons.org/l/by-sa/3.0/80x15.png]]\n"))
  152. (insert (concat "\n[[" org-license-cc-url "][file:" org-license-images-directory "/by-sa/3.0/80x15.png]]\n"))))
  153. (defun org-license-cc-by-nd (language)
  154. (interactive "MLanguage ( br | ca | de | en | es | eu | fi | fr | it | pt ): " language)
  155. (cond ((equal language "br")
  156. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/br/deed.pt_BR")
  157. (insert (concat "* Licença
  158. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Compartil ha Igual 3.0 Brasil]]\n")))
  159. ((equal language "ca")
  160. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/es/deed.ca")
  161. (insert (concat "* Licència
  162. El text està disponible sota la [[" org-license-cc-url "][Reconeixement-SenseObraDerivada 3.0 Espanya]]\n")))
  163. ((equal language "de")
  164. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/de/deed.de")
  165. (insert (concat "* Lizenz
  166. Dieses Werk bzw. Inhalt steht unter einer [[" org-license-cc-url "][Namensnennung-Keine Bearbeitung 3.0 Deutschland]]\n")))
  167. ((equal language "es")
  168. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/es/deed.es")
  169. (insert (concat "* Licencia
  170. Este documento está bajo una [[" org-license-cc-url "][Licencia Creative Commons Atribución-SinDerivadas 3.0]]\n")))
  171. ((equal language "eu")
  172. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/es/deed.eu")
  173. (insert (concat "* Licenzua
  174. Testua [[" org-license-cc-url "][Aitortu-LanEratorririkGabe 3.0 Espainia]] lizentziari jarraituz erabil daiteke\n")))
  175. ((equal language "fi")
  176. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/1.0/fi/deed.fi")
  177. (insert (concat "* Lisenssi
  178. Teksti on saatavilla [[" org-license-cc-url "][Nimeä-JaaSamoin 1.0 Suomi]] lisenssillä\n")))
  179. ((equal language "fr")
  180. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/fr/deed.fr")
  181. (insert (concat "* Licence
  182. Ce(tte) œuvre est mise à disposition selon les termes de la [[" org-license-cc-url "][Licence Creative Commons Attribution - Pas de Modification 3.0 France]]\n")))
  183. ((equal language "gl")
  184. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/es/deed.gl")
  185. (insert (concat "* Licenza
  186. Todo o texto está dispoñible baixo a [[" org-license-cc-url "][licenza Creative Commons recoñecemento compartir igual 3.0]].\n")))
  187. ((equal language "it")
  188. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/it/deed.it")
  189. (insert (concat "* Licenza
  190. Quest'opera e distribuita con Licenza [[" org-license-cc-url "][Licenza Creative Commons Attribuzione - Non opere derivate 3.0 Italia]]\n")))
  191. ((equal language "jp")
  192. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/2.1/jp/deed.en")
  193. (insert (concat "* ライセンス
  194. この文書は、[[" org-license-cc-url "][Creative Commons No Derivatives 2.1]] ライセンスの下である\n")))
  195. ((equal language "nl")
  196. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/nl/deed.nl")
  197. (insert (concat "* Licentie
  198. Dit werk is valt onder een [[" org-license-cc-url "][Creative Commons Naamsvermelding GeenAfgeleideWerken 3.0 Nederland]]\n")))
  199. ((equal language "pt")
  200. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/3.0/pt/deed.pt")
  201. (insert (concat "* Licença
  202. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Sem Derivados 3.0 Portugal]]\n")))
  203. (t
  204. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nd/4.0/deed")
  205. (insert (concat "* License
  206. This document is under a [[" org-license-cc-url "][Creative Commons No Derivatives 4.0 International]]\n"))))
  207. (if (string= "" org-license-images-directory)
  208. (insert (concat "\n[[" org-license-cc-url "][file:https://i.creativecommons.org/l/by-nd/3.0/80x15.png]]\n"))
  209. (insert (concat "\n[[" org-license-cc-url "][file:" org-license-images-directory "/by-nd/3.0/80x15.png]]\n"))))
  210. (defun org-license-cc-by-nc (language)
  211. (interactive "MLanguage ( br | ca | de | en | es | eu | fi | fr | it | jp | nl | pt ): " language)
  212. (cond ((equal language "br")
  213. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/br/deed.pt_BR")
  214. (insert (concat "* Licença
  215. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Não Comercial 3.0 Brasil]]\n")))
  216. ((equal language "ca")
  217. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/es/deed.ca")
  218. (insert (concat "* Licència
  219. El text està disponible sota la [[" org-license-cc-url "][Reconeixement-NoComercial 3.0 Espanya]]\n")))
  220. ((equal language "de")
  221. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/de/deed.de")
  222. (insert (concat "* Lizenz
  223. Dieses Werk bzw. Inhalt steht unter einer [[" org-license-cc-url "][Namensnennung-Nicht-kommerziell 3.0 Deutschland]]\n")))
  224. ((equal language "es")
  225. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/es/deed.es")
  226. (insert (concat "* Licencia
  227. Este documento está bajo una [[" org-license-cc-url "][Licencia Creative Commons Reconocimiento-NoComercial 3.0]]\n")))
  228. ((equal language "eu")
  229. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/es/deed.eu")
  230. (insert "* Licenzua
  231. Testua [[" org-license-cc-url "][Aitortu-EzKomertziala 3.0 Espainia]] lizentziari jarraituz erabil daiteke\n"))
  232. ((equal language "fi")
  233. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/1.0/fi/deed.fi")
  234. (insert (concat "* Lisenssi
  235. Teksti on saatavilla [[" org-license-cc-url "][Nimeä-Epäkaupallinen 1.0 Suomi]] lisenssillä\n")))
  236. ((equal language "fr")
  237. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/fr/deed.fr")
  238. (insert (concat "* Licence
  239. Ce(tte) œuvre est mise à disposition selon les termes de la [[" org-license-cc-url "][Licence Creative Commons Attribution - Pas d'Utilisation Commerciale 3.0 France]]\n")))
  240. ((equal language "gl")
  241. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/es/deed.gl")
  242. (insert (concat "* Licenza
  243. Todo o texto está dispoñible baixo a [[" org-license-cc-url "][licenza Creative Commons recoñecemento compartir igual 3.0]].\n")))
  244. ((equal language "it")
  245. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/it/deed.it")
  246. (insert (concat "* Licenza
  247. Quest'opera e distribuita con Licenza [[" org-license-cc-url "][Licenza Creative Commons Attribuzione - Non commerciale 3.0 Italia]]\n")))
  248. ((equal language "jp")
  249. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/2.1/jp/deed.en")
  250. (insert (concat "* ライセンス
  251. この文書は、[[" org-license-cc-url "][Creative Commons Attribution-NonCommercial 2.1 ]] ライセンスの下である\n")))
  252. ((equal language "nl")
  253. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/nl/deed.nl")
  254. (insert (concat "* Licentie
  255. Dit werk is valt onder een [[" org-license-cc-url "][Creative Commons Naamsvermelding NietCommercieel 3.0 Nederland 3.0 Nederland]]\n")))
  256. ((equal language "pt")
  257. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/pt/deed.pt")
  258. (insert (concat "* Licença
  259. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Não Comercial 3.0 Portugal]]\n")))
  260. (t
  261. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/4.0/deed")
  262. (insert (concat "* License
  263. This document is under a [[" org-license-cc-url "][Creative Commons Attribution-NonCommercial 4.0 International]]\n"))))
  264. (if (string= "" org-license-images-directory)
  265. (insert (concat "\n[[" org-license-cc-url "][file:https://i.creativecommons.org/l/by-nc/3.0/80x15.png]]\n"))
  266. (insert (concat "\n[[" org-license-cc-url "][file:" org-license-images-directory "/by-nc/3.0/80x15.png]]\n"))))
  267. (defun org-license-cc-by-nc-sa (language)
  268. (interactive "MLanguage ( br | ca | de | en | es | eu | fi | fr | gl | it | jp | nl | pt ): " language)
  269. (cond ((equal language "br")
  270. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/br/deed.pt_BR")
  271. (insert (concat "* Licença
  272. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Não Comercial - Compartil ha Igual 3.0 Brasil]]\n")))
  273. ((equal language "ca")
  274. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/es/deed.ca")
  275. (insert (concat "* Licència
  276. El text està disponible sota la [[" org-license-cc-url "][Reconeixement-NoComercial 3.0 Espanya]]\n")))
  277. ((equal language "de")
  278. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.de")
  279. (insert (concat "* Lizenz
  280. Dieses Werk bzw. Inhalt steht unter einer [[" org-license-cc-url "][Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland]]\n")))
  281. ((equal language "es")
  282. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/es/deed.es")
  283. (insert (concat "* Licencia
  284. Este documento está bajo una [[" org-license-cc-url "][Licencia Creative Commons Reconocimiento-NoComercial 3.0]]\n")))
  285. ((equal language "eu")
  286. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/es/deed.eu")
  287. (insert "* Licenzua
  288. Testua [[" org-license-cc-url "][Aitortu-EzKomertziala-PartekatuBerdin 3.0 Espainia]] lizentziari jarraituz erabil daiteke\n"))
  289. ((equal language "fi")
  290. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/1.0/fi/deed.fi")
  291. (insert (concat "* Lisenssi
  292. Teksti on saatavilla [[" org-license-cc-url "][Nimeä-Epäkaupallinen-JaaSamoin 1.0 Suomi]] lisenssillä\n")))
  293. ((equal language "fr")
  294. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/fr/deed.fr")
  295. (insert (concat "* Licence
  296. Ce(tte) œuvre est mise à disposition selon les termes de la [[" org-license-cc-url "][Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 3.0 France]]\n")))
  297. ((equal language "gl")
  298. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/es/deed.gl")
  299. (insert (concat "* Licenza
  300. Todo o texto está dispoñible baixo a [[" org-license-cc-url "][licenza Creative Commons recoñecemento compartir igual 3.0]].\n")))
  301. ((equal language "it")
  302. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/it/deed.it")
  303. (insert (concat "* Licenza
  304. Quest'opera e distribuita con Licenza [[" org-license-cc-url "][Licenza Creative Commons Attribuzione - Non opere derivate 3.0 Italia]]\n")))
  305. ((equal language "jp")
  306. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/2.1/jp/deed.en")
  307. (insert (concat "* ライセンス
  308. この文書は、[[" org-license-cc-url "][License Creative Commons Attribution Non Commercial Share Alike 2.1 ]] ライセンスの下である\n")))
  309. ((equal language "nl")
  310. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/3.0/nl/deed.nl")
  311. (insert (concat "* Licentie
  312. Dit werk is valt onder een [[" org-license-cc-url "][Creative Commons Naamsvermelding NietCommercieel GelijkDelen 3.0 Nederland]]\n")))
  313. ((equal language "pt")
  314. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc/3.0/pt/deed.pt")
  315. (insert (concat "* Licença
  316. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição NãoComercial Compartil ha Igual 3.0 Portugal]]\n")))
  317. (t
  318. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-sa/4.0/deed")
  319. (insert (concat "* License
  320. This document is under a [[" org-license-cc-url "][License Creative Commons Attribution Non Commercial Share Alike 4.0 International]]\n"))))
  321. (if (string= "" org-license-images-directory)
  322. (insert (concat "\n[[" org-license-cc-url "][file:https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png]]\n"))
  323. (insert (concat "\n[[" org-license-cc-url "][file:" org-license-images-directory "/by-nc-sa/3.0/80x15.png]]\n"))))
  324. (defun org-license-cc-by-nc-nd (language)
  325. (interactive "MLanguage ( br | ca | de | en | es | eu | fi | fr | gl | it | pt ): " language)
  326. (cond ((equal language "br")
  327. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/pt/deed.pt")
  328. (insert (concat "* Licença
  329. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Não Comercial Sem Derivados 3.0 Brasil]]\n")))
  330. ((equal language "ca")
  331. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/es/deed.ca")
  332. (insert (concat "* Licència
  333. El text està disponible sota la [[" org-license-cc-url "][Reconeixement-NoComercial-SenseObraDerivada 3.0 Espanya]]\n")))
  334. ((equal language "de")
  335. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.de")
  336. (insert (concat "* Lizenz
  337. Dieses Werk bzw. Inhalt steht unter einer [[" org-license-cc-url "][Namensnennung-NichtKommerziell-KeineBearbeitung 3.0 Deutschland]]\n")))
  338. ((equal language "es")
  339. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/es/deed.es")
  340. (insert (concat "* Licencia
  341. Este documento está bajo una [[" org-license-cc-url "][Licencia Creative Commons Reconocimiento-NoComercial-SinObraDerivada 3.0]]\n")))
  342. ((equal language "eu")
  343. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/es/deed.eu")
  344. (insert (concat "* Licenzua
  345. Testua [[" org-license-cc-url "][Aitortu-LanEratorririkGabe 3.0 Espainia]] lizentziari jarraituz erabil daiteke\n")))
  346. ((equal language "fi")
  347. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/1.0/fi/deed.fi")
  348. (insert (concat "* Lisenssi
  349. Teksti on saatavilla [[" org-license-cc-url "][Nimeä-Ei muutoksia-Epäkaupallinen 1.0 Suomi]] lisenssillä\n")))
  350. ((equal language "fr")
  351. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/fr/deed.fr")
  352. (insert (concat "* Licence
  353. Ce(tte) œuvre est mise à disposition selon les termes de la [[" org-license-cc-url "][Licence Creative Commons Attribution - Pas de Modification 3.0 France]]\n")))
  354. ((equal language "gl")
  355. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/es/deed.gl")
  356. (insert (concat "* Licenza
  357. Todo o texto está dispoñible baixo a [[" org-license-cc-url "][licenza Creative Commons recoñecemento compartir igual 3.0]].\n")))
  358. ((equal language "it")
  359. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/it/deed.it")
  360. (insert (concat "* Licenza
  361. Quest'opera e distribuita con Licenza [[" org-license-cc-url "][Licenza Creative Commons Attribuzione - Non opere derivate 3.0 Italia]]\n")))
  362. ((equal language "jp")
  363. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/2.1/jp/deed.en")
  364. (insert (concat "* ライセンス
  365. この文書は [[" org-license-cc-url "][License Creative Commons Attribution Non Commercial - No Derivs 2.1]] ライセンスの下である\n")))
  366. ((equal language "nl")
  367. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.nl")
  368. (insert (concat "* Licentie
  369. Dit werk is valt onder een [[" org-license-cc-url "][Creative Commons Naamsvermelding NietCommercieel GeenAfgeleideWerken 3.0 Nederland]]\n")))
  370. ((equal language "pt")
  371. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/3.0/pt/deed.pt")
  372. (insert (concat "* Licença
  373. Este texto é disponibilizado nos termos da licença [[" org-license-cc-url "][Atribuição Não Comercial Sem Derivados 3.0 Portugal]]\n")))
  374. (t
  375. (setq org-license-cc-url "https://creativecommons.org/licenses/by-nc-nd/4.0/deed")
  376. (insert (concat "* License
  377. This document is under a [[" org-license-cc-url "][License Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International]]\n"))))
  378. (if (string= "" org-license-images-directory)
  379. (insert (concat "\n[[" org-license-cc-url "][file:https://i.creativecommons.org/l/by-nc-nd/3.0/80x15.png]]\n"))
  380. (insert (concat "\n[[" org-license-cc-url "][file:" org-license-images-directory "/by-nc-nd/3.0/80x15.png]]\n"))))
  381. (defun org-license-gfdl (language)
  382. (interactive "MLanguage (es | en): " language)
  383. (cond ((equal language "es")
  384. (insert "* Licencia
  385. Copyright (C) " (format-time-string "%Y") " " user-full-name
  386. "\n Se permite copiar, distribuir y/o modificar este documento
  387. bajo los términos de la GNU Free Documentation License, Version 1.3
  388. o cualquier versión publicada por la Free Software Foundation;
  389. sin Secciones Invariantes y sin Textos de Portada o Contraportada.
  390. Una copia de la licencia está incluida en [[https://www.gnu.org/copyleft/fdl.html][GNU Free Documentation License]].\n"))
  391. (t (insert (concat "* License
  392. Copyright (C) " (format-time-string "%Y") " " user-full-name
  393. "\n Permission is granted to copy, distribute and/or modify this document
  394. under the terms of the GNU Free Documentation License, Version 1.3
  395. or any later version published by the Free Software Foundation;
  396. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
  397. A copy of the license is included in [[https://www.gnu.org/copyleft/fdl.html][GNU Free Documentation License]].\n"))))
  398. (if (string= "" org-license-images-directory)
  399. (insert "\n[[https://www.gnu.org/copyleft/fdl.html][file:https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/GFDL_Logo.svg/200px-GFDL_Logo.svg.png]]\n")
  400. (insert (concat "\n[[https://www.gnu.org/copyleft/fdl.html][file:" org-license-images-directory "/gfdl/gfdl.png]]\n"))))
  401. (defun org-license-publicdomain-zero (language)
  402. (interactive "MLanguage ( en | es ): " language)
  403. (setq org-license-pd-url "https://creativecommons.org/publicdomain/zero/1.0/")
  404. (setq org-license-pd-file "zero/1.0/80x15.png")
  405. (if (equal language "es")
  406. (insert (concat "* Licencia
  407. Este documento está bajo una licencia [[" org-license-pd-url "][Public Domain Zero]]\n"))
  408. (insert (concat "* License
  409. This documento is under a [[" org-license-pd-url "][Public Domain Zero]] license\n")))
  410. (if (string= "" org-license-images-directory)
  411. (insert (concat "\n[[" org-license-pd-url "][file:https://i.creativecommons.org/p/zero/1.0/80x15.png]]\n"))
  412. (insert (concat "\n[[" org-license-pd-url "][file:" org-license-images-directory org-license-pd-file "]]\n"))))
  413. (defun org-license-publicdomain-mark (language)
  414. (interactive "MLanguage ( en | es ): " language)
  415. (setq org-license-pd-url "https://creativecommons.org/publicdomain/mark/1.0/")
  416. (setq org-license-pd-file "mark/1.0/80x15.png")
  417. (if (equal language "es")
  418. (insert (concat "* Licencia
  419. Este documento está bajo una licencia [[" org-license-pd-url "][Etiqueta de Dominio Público 1.0]]\n"))
  420. (insert (concat "* License
  421. This documento is under a [[" org-license-pd-url "][Public Domain Mark]] license\n")))
  422. (if (string= "" org-license-images-directory)
  423. (insert (concat "\n[[" org-license-pd-url "][file:https://i.creativecommons.org/p/mark/1.0/80x15.png]]\n"))
  424. (insert (concat "\n[[" org-license-pd-url "][file:" org-license-images-directory org-license-pd-file "]]\n"))))
  425. (defun org-license-print-all ()
  426. "Print all combinations of licenses and languages, it's useful to find bugs"
  427. (interactive)
  428. (org-license-gfdl "es")
  429. (org-license-gfdl "en")
  430. (org-license-publicdomain-mark "es")
  431. (org-license-publicdomain-mark "en")
  432. (org-license-publicdomain-zero "es")
  433. (org-license-publicdomain-zero "en")
  434. (org-license-cc-by "br")
  435. (org-license-cc-by "ca")
  436. (org-license-cc-by "de")
  437. (org-license-cc-by "es")
  438. (org-license-cc-by "en")
  439. (org-license-cc-by "eo")
  440. (org-license-cc-by "eu")
  441. (org-license-cc-by "fi")
  442. (org-license-cc-by "fr")
  443. (org-license-cc-by "gl")
  444. (org-license-cc-by "it")
  445. (org-license-cc-by "jp")
  446. (org-license-cc-by "nl")
  447. (org-license-cc-by "pt")
  448. (org-license-cc-by-sa "br")
  449. (org-license-cc-by-sa "ca")
  450. (org-license-cc-by-sa "de")
  451. (org-license-cc-by-sa "es")
  452. (org-license-cc-by-sa "en")
  453. ;; (org-license-cc-by-sa "eo")
  454. (org-license-cc-by-sa "eu")
  455. (org-license-cc-by-sa "fi")
  456. (org-license-cc-by-sa "fr")
  457. (org-license-cc-by-sa "gl")
  458. (org-license-cc-by-sa "it")
  459. (org-license-cc-by-sa "jp")
  460. (org-license-cc-by-sa "nl")
  461. (org-license-cc-by-sa "pt")
  462. (org-license-cc-by-nd "br")
  463. (org-license-cc-by-nd "ca")
  464. (org-license-cc-by-nd "de")
  465. (org-license-cc-by-nd "es")
  466. (org-license-cc-by-nd "en")
  467. ;; (org-license-cc-by-nd "eo")
  468. (org-license-cc-by-nd "eu")
  469. (org-license-cc-by-nd "fi")
  470. (org-license-cc-by-nd "fr")
  471. (org-license-cc-by-nd "gl")
  472. (org-license-cc-by-nd "it")
  473. (org-license-cc-by-nd "jp")
  474. (org-license-cc-by-nd "nl")
  475. (org-license-cc-by-nd "pt")
  476. (org-license-cc-by-nc "br")
  477. (org-license-cc-by-nc "ca")
  478. (org-license-cc-by-nc "de")
  479. (org-license-cc-by-nc "es")
  480. (org-license-cc-by-nc "en")
  481. ;; (org-license-cc-by-nc "eo")
  482. (org-license-cc-by-nc "eu")
  483. (org-license-cc-by-nc "fi")
  484. (org-license-cc-by-nc "fr")
  485. (org-license-cc-by-nc "gl")
  486. (org-license-cc-by-nc "it")
  487. (org-license-cc-by-nc "jp")
  488. (org-license-cc-by-nc "nl")
  489. (org-license-cc-by-nc "pt")
  490. (org-license-cc-by-nc-sa "br")
  491. (org-license-cc-by-nc-sa "ca")
  492. (org-license-cc-by-nc-sa "de")
  493. (org-license-cc-by-nc-sa "es")
  494. (org-license-cc-by-nc-sa "en")
  495. ;; (org-license-cc-by-nc-sa "eo")
  496. (org-license-cc-by-nc-sa "eu")
  497. (org-license-cc-by-nc-sa "fi")
  498. (org-license-cc-by-nc-sa "fr")
  499. (org-license-cc-by-nc-sa "gl")
  500. (org-license-cc-by-nc-sa "it")
  501. (org-license-cc-by-nc-sa "jp")
  502. (org-license-cc-by-nc-sa "nl")
  503. (org-license-cc-by-nc-sa "pt")
  504. (org-license-cc-by-nc-nd "br")
  505. (org-license-cc-by-nc-nd "ca")
  506. (org-license-cc-by-nc-nd "de")
  507. (org-license-cc-by-nc-nd "es")
  508. (org-license-cc-by-nc-nd "en")
  509. ;; (org-license-cc-by-nc-nd "eo")
  510. (org-license-cc-by-nc-nd "eu")
  511. (org-license-cc-by-nc-nd "fi")
  512. (org-license-cc-by-nc-nd "fr")
  513. (org-license-cc-by-nc-nd "gl")
  514. (org-license-cc-by-nc-nd "it")
  515. (org-license-cc-by-nc-nd "jp")
  516. (org-license-cc-by-nc-nd "nl")
  517. (org-license-cc-by-nc-nd "pt")
  518. )