Comments (7)
Just realised that we need a proper mimetype for the output ... therefor we need a file mimetype detection too
from filetranspiler.
@lbohnsac in terms of output do you mean on encoding files within the Ignition configuration or encoding the literal output of the file for a use case?
from filetranspiler.
Something like this but with a command line switch like -64:
diff filetranspile filetranspile.base64
13d12
< import base64
179,181d177
< file_contents_bytes = file_contents.encode('utf-8')
< file_contents_base64 = base64.b64encode(file_contents_bytes)
< file_contents = file_contents_base64.decode('utf-8')
187c183
< 'source': 'data:text/plain;charset=utf-8;base64,{}'.format(file_contents)
---
> 'source': 'data:,{}'.format(quote(file_contents))
228,231d223
< file_contents_bytes = file_contents.encode('utf-8')
< file_contents_base64 = base64.b64encode(file_contents_bytes)
< file_contents = file_contents_base64.decode('utf-8')
<
237c229
< 'source': 'data:text/plain;charset=utf-8;base64,{}'.format(file_contents)
---
> 'source': 'data:,{}'.format(quote(file_contents))
326c318
<
---
>
I have only limited python skills ...
from filetranspiler.
Ah I see. Sure I'll take a stab at it!
from filetranspiler.
The advantage is the possibility to drop binaries in the ignition file too
from filetranspiler.
two thumbs up! ;)
from filetranspiler.
In the PR we are discussing doing a slightly different pattern. PTAL.
from filetranspiler.
Related Issues (13)
- missing "filesystem" in final ignition config HOT 1
- YAML module missing from image HOT 1
- filetranspile vs filetranspiler
- RPM package HOT 3
- SyntaxError line 135: f'link: {source_path} is not in the ' HOT 5
- Update README with dependencies HOT 2
- Traceback while using the magic package HOT 5
- ModuleNotFoundError: No module named 'magic' HOT 5
- Release latest HOT 3
- File transpiler does not replace the file if it already exists in ignition.
- Add --dereference-symlinks
- Release 1.1.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filetranspiler.