Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryBrain committed Nov 4, 2020
2 parents 6ff805a + 4cb5152 commit 181ca47
Show file tree
Hide file tree
Showing 7 changed files with 234 additions and 293 deletions.
14 changes: 7 additions & 7 deletions clients/python-client/parsr_client/parsr_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def send_documents_folder(
return responses

def get_status(self, request_id: str = "", server: str = ""):
"""Get the status of a partcular request using its ID
"""Get the status of a particular request using its ID
- request_id: The ID of the request to be queried with the server
- server: The server address where the query is to be made
Expand Down Expand Up @@ -310,8 +310,8 @@ def get_json(self, request_id: str = "", server: str = ""):
raise Exception('No request ID provided')
else:
request_id = self.request_id
r = get(
'http://{}/api/v1/json/{}'.format(server, request_id))
r = get(
'http://{}/api/v1/json/{}'.format(server, request_id))
if r.text != "":
return r.json()
else:
Expand All @@ -334,8 +334,8 @@ def get_markdown(self, request_id: str = "", server: str = ""):
raise Exception('No request ID provided')
else:
request_id = self.request_id
r = get(
'http://{}/api/v1/markdown/{}'.format(server, request_id))
r = get(
'http://{}/api/v1/markdown/{}'.format(server, request_id))
if r.text != "":
return r.text
else:
Expand All @@ -358,8 +358,8 @@ def get_text(self, request_id: str = "", server: str = ""):
raise Exception('No request ID provided')
else:
request_id = self.request_id
r = get(
'http://{}/api/v1/text/{}'.format(server, request_id))
r = get(
'http://{}/api/v1/text/{}'.format(server, request_id))
if r.text != "":
return r.text
else:
Expand Down
2 changes: 1 addition & 1 deletion demo/doc-versioning/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Doc Versioning

- Stores and displays document (PDF, Images, DOCx) revisions and diffs.
- Uses [Parsr](http://par.sr) to perform the document data extraction.
- Uses [Parsr](https://github.com/axa-group/Parsr) to perform the document data extraction.
- Based on Python 3

## Installation
Expand Down
156 changes: 11 additions & 145 deletions demo/vue-viewer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/vue-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"dependencies": {
"axios": "^0.19.2",
"core-js": "^2.6.5",
"marked": "^1.2.0",
"sass": "^1.26.3",
"sass-loader": "^7.1.0",
"vue": "^2.6.11",
"vue-markdown": "^2.2.4",
"vue-observe-visibility": "^0.4.6",
"vue-router": "^3.1.6",
"vuetify": "^2.2.17",
Expand Down
12 changes: 7 additions & 5 deletions demo/vue-viewer/src/views/ViewerMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<v-tab>Render</v-tab>

<v-tab-item class="tabItem">
<pre class="text">{{ documentMarkdown }}</pre>
<pre class="text">{{ compiledMarkdown }}</pre>
</v-tab-item>
<v-tab-item class="tabItem">
<vueMarkdown class="text">{{ documentMarkdown }}</vueMarkdown>
<vueMarkdown class="text">{{ compiledMarkdown }}</vueMarkdown>
</v-tab-item>
</v-tabs>

Expand Down Expand Up @@ -42,19 +42,21 @@
</template>
<script>
import { mapState } from 'vuex';
import VueMarkdown from 'vue-markdown';
import marked from 'marked';
export default {
data() {
return { error: null };
},
components: { VueMarkdown },
computed: {
uploadedDocument() {
return this.documentId !== null;
},
documentMarkdownFetched() {
return this.documentMarkdown !== null;
return this.compiledMarkdown !== null;
},
compiledMarkdown: function() {
return marked(this.documentMarkdown, { sanitize: true });
},
...mapState({
documentId: state => state.uuid,
Expand Down
Loading

0 comments on commit 181ca47

Please sign in to comment.