lxndio / reportron Goto Github PK
View Code? Open in Web Editor NEWGenerate pdf reports from json HTTP requests
License: GNU General Public License v3.0
Generate pdf reports from json HTTP requests
License: GNU General Public License v3.0
Check why the template parser generates empty lines:
PS H:\GitRepos\reportron> cargo run
Compiling reportron v0.1.0 (H:\GitRepos\reportron)
warning: unused import: `std::process::Command`
--> src\latex.rs:3:5
|
3 | use std::process::Command;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)] on by default
warning: unused variable: `eval_content`
--> src\latex.rs:85:9
|
85 | let eval_content = String::new();
| ^^^^^^^^^^^^ help: consider prefixing with an underscore: `_eval_content`
|
= note: #[warn(unused_variables)] on by default
error[E0507]: cannot move out of `*obj` which is behind a shared reference
--> src\latex.rs:39:26
|
39 | Some(obj) => *obj,
| ^^^^ move occurs because `*obj` has type `std::vec::Vec<std::collections::HashMap<std::string::String, std::string::String>>`, which does not implement the `Copy` trait
error[E0499]: cannot borrow `*foreaches` as mutable more than once at a time
--> src\latex.rs:106:32
|
89 | let foreach: &mut ForEach = ForEach::get_from_mut(foreaches, foreach).unwrap();
| --------- first mutable borrow occurs here
...
97 | while foreach.has_next_obj() {
| ------- first borrow later used here
...
106 | for foreach in foreaches.iter_mut() {
| ^^^^^^^^^ second mutable borrow occurs here
error[E0499]: cannot borrow `*foreaches` as mutable more than once at a time
--> src\latex.rs:108:94
|
89 | let foreach: &mut ForEach = ForEach::get_from_mut(foreaches, foreach).unwrap();
| --------- first mutable borrow occurs here
...
97 | while foreach.has_next_obj() {
| ------- first borrow later used here
...
108 | lines.insert(i, match eval_foreach(foreach.single_var().to_string(), foreaches, collections) {
| ^^^^^^^^^ second mutable borrow occurs here
error[E0502]: cannot borrow `foreaches` as immutable because it is also borrowed as mutable
--> src\latex.rs:124:46
|
89 | let foreach: &mut ForEach = ForEach::get_from_mut(foreaches, foreach).unwrap();
| --------- mutable borrow occurs here
...
97 | while foreach.has_next_obj() {
| ------- mutable borrow later used here
...
124 | re_of.replace_all(&new_line, |caps: &Captures| ForEach::get_from(foreaches, caps[2].to_string()).unwrap().current_obj().get(&caps[1]).unwrap());
| ^^^^^^^^^^^^^^^^^ --------- second borrow occurs due to use of `foreaches` in closure
| |
| immutable borrow occurs here
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0499, E0502, E0507.
For more information about an error, try `rustc --explain E0499`.
error: Could not compile `reportron`.
To learn more, run the command again with --verbose.
When using a key test in #[test of a]
that was not sent in the request, the server crashes.
If generation does not work because of a failure, delete the possibly already created temp directory.
Replace umlauts and other special characters with the corresponding latex codes. For example, ä could be replaced by \"a
.
Currently the server crashes if the pdf directory does not exist.
Beim Versuch fantapptic_invoice.tex mit der in Postman vorhandenen Request Generate Fantapptic PDF
zu erstellen kommt dieser Fehler:
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src\libcore\option.rs:347:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.