Cleanup remaining clj(s) resources

* Move template files into a more organized resources templates dir
  except for zotero-items.edn which isn't a template
* Remove unused favorites templates
* Move grammar file which should be in a resource path and not a
  standard source path
This commit is contained in:
Gabriel Horner
2023-05-26 14:49:40 -04:00
committed by Tienson Qin
parent 4c0583ce27
commit 5f44d9bdf2
13 changed files with 6 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
{:paths ["src/main" "src/electron" "templates" "src/resources"]
{:paths ["src/main" "src/electron" "src/resources"]
:deps
{org.clojure/clojure {:mvn/version "1.11.1"}
rum/rum {:mvn/version "0.12.9"}

View File

@@ -339,7 +339,7 @@
(def custom-css-file "custom.css")
(def export-css-file "export.css")
(def custom-js-file "custom.js")
(def config-default-content (rc/inline "config.edn"))
(def config-default-content (rc/inline "templates/config.edn"))
(def config-default-content-md5 (let [md5 (new crypt/Md5)]
(.update md5 (crypt/stringToUtf8ByteArray config-default-content))
(crypt/byteArrayToHex (.digest md5))))

View File

@@ -41,7 +41,7 @@
(state/set-global-config! config)
config))
(def default-content (rc/inline "global-config.edn"))
(def default-content (rc/inline "templates/global-config.edn"))
(defn- create-global-config-file-if-not-exists
[repo-url]

View File

@@ -48,8 +48,8 @@
(let [format (state/get-preferred-format)
file-rpath (str "pages/" "contents." (config/get-file-extension format))
default-content (case (name format)
"org" (rc/inline "contents.org")
"markdown" (rc/inline "contents.md")
"org" (rc/inline "templates/contents.org")
"markdown" (rc/inline "templates/contents.md")
"")]
(p/let [_ (fs/mkdir-if-not-exists (path/path-join repo-dir pages-dir))
file-exists? (fs/create-if-not-exists repo-url repo-dir file-rpath default-content)]

View File

@@ -1 +0,0 @@
-

View File

@@ -1 +0,0 @@
*

View File

@@ -13,4 +13,4 @@ fo = "fo"
aks = "aks"
Mannor = "Mannor"
[files]
extend-exclude = ["resources/*", "templates/*", "src/resources/*"]
extend-exclude = ["resources/*", "src/resources/*"]