-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
437 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Made by Isaac Van Doren. Source at https://github.com/isaacvando/elm-to-gh-pages. | ||
name: Deploy an Elm app to GitHub Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# Cancel current deployment when a new push occurs | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Elm artifact | ||
uses: jorelali/setup-elm@v5 | ||
with: | ||
elm-version: 0.19.1 | ||
- run: elm make src/Main.elm --output=target/elm.js --optimize | ||
|
||
- name: Install uglify.js | ||
run: npm install uglify-js -g | ||
|
||
- name: Uglify main.js | ||
run: uglifyjs target/main.js --compress "pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe" | uglifyjs --mangle --output target/main.js | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "." | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
# All types of virtualenvs | ||
.direnv/ | ||
.venv/ | ||
.env/ | ||
venv/ | ||
|
||
# Always | ||
__pycache__/ | ||
|
||
# IDEs | ||
.vscode/ | ||
*.iml | ||
.idea/ | ||
.vscode/ | ||
|
||
# npm | ||
package.json | ||
package-lock.json | ||
node_modules/ | ||
|
||
# Elm | ||
elm-stuff/ | ||
elm.js | ||
repl-temp-* | ||
|
||
# Our build setup | ||
target/ | ||
|
||
# Mac | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
## What this does | ||
Deployed to: | ||
|
||
When reopening a word mailmerge file and the backing excel file is not in the | ||
expected location, then you will lose the filters and sort that were set. | ||
https://nwolff.github.io/word-mailmerge-datasource/ | ||
|
||
This tool shows the filter and sort information of a mailmerge docx file, it looks like this : | ||
--- | ||
|
||
SELECT * FROM /Users/wolff_n/Desktop/clients 10 ans.xlsx | ||
WHERE ((Carte_Club_4Vallées = 'oui')) ORDER BY Nom | ||
Requires elm0.19.1 | ||
|
||
## Running the online webapp | ||
To install elm without being a sudoer: | ||
|
||
https://word-mailmerge-datasource-yjvahykdxa-oa.a.run.app/ | ||
npm install elm | ||
|
||
## Running from the command-line | ||
To develop: | ||
|
||
`./retrieve_datasource_query.py` takes the path to a docx or dotx file and displays the datasource query | ||
elm reactor | ||
|
||
Or if you've installed elm-live: | ||
|
||
elm-live.js src/Main.elm --open -- --output target/elm.js --debug | ||
|
||
To build: | ||
|
||
elm make src/Main.elm --output target/elm.js | ||
|
||
Deployed automatically upon push to main: | ||
|
||
Using https://github.com/isaacvando/elm-to-gh-pages |
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.dropzone { | ||
border-radius: 20px; | ||
width: 480px; | ||
height: 100px; | ||
margin: 100px auto; | ||
padding: 20px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"type": "application", | ||
"source-directories": [ | ||
"src" | ||
], | ||
"elm-version": "0.19.1", | ||
"dependencies": { | ||
"direct": { | ||
"agu-z/elm-zip": "3.0.1", | ||
"elm/browser": "1.0.2", | ||
"elm/core": "1.0.5", | ||
"elm/file": "1.0.5", | ||
"elm/html": "1.0.0", | ||
"elm/json": "1.1.3", | ||
"ymtszw/elm-xml-decode": "3.2.1" | ||
}, | ||
"indirect": { | ||
"elm/bytes": "1.0.8", | ||
"elm/parser": "1.1.0", | ||
"elm/time": "1.0.0", | ||
"elm/url": "1.0.0", | ||
"elm/virtual-dom": "1.0.3", | ||
"elm-community/list-extra": "8.7.0", | ||
"folkertdev/elm-flate": "2.0.5", | ||
"jinjor/elm-xml-parser": "2.0.0", | ||
"justinmimbs/date": "4.0.1", | ||
"justinmimbs/time-extra": "1.1.1", | ||
"rtfeldman/elm-hex": "1.0.0" | ||
} | ||
}, | ||
"test-dependencies": { | ||
"direct": {}, | ||
"indirect": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Word Mailmerge Query</title> | ||
|
||
<link rel="icon" href="assets/favicon.ico" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
||
<link href="assets/bootstrap.min.css" rel="stylesheet" media="screen" /> | ||
|
||
<link href="assets/style.css" rel="stylesheet" media="screen" /> | ||
|
||
<script type="text/javascript" src="target/elm.js"></script> | ||
</head> | ||
<body> | ||
<script type="text/javascript"> | ||
Elm.Main.init(); | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.