# Agent for information

**URL:** <https://community.glideapps.com/t/agent-for-information/29981>\
**Category:** Ask for Help\
**Tags:** custom-code\
**Created:** [August 4, 2021, 11:33am UTC](https://community.glideapps.com/t/agent-for-information/29981 "2021-08-04T11:33:43Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [August 10, 2021, 2:20pm UTC](https://community.glideapps.com/t/agent-for-information/29981/42 "2021-08-10T14:20:58Z")

</div>

Thank you. Will look into it.

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [August 12, 2021, 4:26pm UTC](https://community.glideapps.com/t/agent-for-information/29981/43 "2021-08-12T16:26:55Z")

</div>

How about extracting info from an image, any clues? Been trying to look for a JavaScript for it but I’ve not been able…☹

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 13, 2021, 12:15am UTC](https://community.glideapps.com/t/agent-for-information/29981/44 "2021-08-13T00:15:06Z")

</div>

What type of info do you want to extract?

I suspect if you pass it from URL then you will get into massive troubles with CORS.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 13, 2021, 1:04am UTC](https://community.glideapps.com/t/agent-for-information/29981/45 "2021-08-13T01:04:20Z")

</div>

You’ve not been looking [hard enough](https://www.google.com/search?q=extract+exif+data+from+image+js&sxsrf=ALeKk03i7KelAId7JHVTW8KaQd-YXOoCMQ%3A1628816464474&ei=UMQVYdmhHOfbz7sPwdO1sAU&oq=js+exract+exif+data&gs_lcp=Cgdnd3Mtd2l6EAEYADIICAAQCBANEB46BwgAEEcQsAM6BAgAEEM6BQgAEIAEOggIABAWEAoQHjoGCAAQFhAeOgQIABANOgQILhANOgcIIRAKEKABOgoIIRAWEAoQHRAeSgQIQRgAUKukAlisggNgppsDaARwAngAgAGnAYgBjwqSAQQxOC4xmAEAoAEByAEIwAEB&sclient=gws-wiz) 😛

Has Mark asked you to replace my exif extraction code with a YC column? (would be a good idea, if it can be done)

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [August 13, 2021, 1:08am UTC](https://community.glideapps.com/t/agent-for-information/29981/46 "2021-08-13T01:08:42Z")

</div>

I have, I’m just not good at coding, I did that exact search, but I just don’t get it!! 😀 And no, he hasn’t

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [August 13, 2021, 1:09am UTC](https://community.glideapps.com/t/agent-for-information/29981/47 "2021-08-13T01:09:12Z")

</div>

Camera used to take the image, location, time, etc

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 13, 2021, 1:12am UTC](https://community.glideapps.com/t/agent-for-information/29981/48 "2021-08-13T01:12:52Z")

</div>

Well, with Apps Script, it’s as simple as:

```auto
var metadata = file.imageMediaMetadata;

```

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 13, 2021, 1:16am UTC](https://community.glideapps.com/t/agent-for-information/29981/49 "2021-08-13T01:16:11Z")

</div>

> [@PabloMFalero](#):
>
> J’ai, je ne suis tout simplement pas bon en codage, j’ai fait cette recherche exacte, mais je ne comprends tout simplement pas !! :sourire:Et non, il n’a pas

Take a look at this page:

> **[GitHub - exif-js/exif-js: JavaScript library for reading EXIF image metadata](https://github.com/exif-js/exif-js)**
>
> JavaScript library for reading EXIF image metadata - GitHub - exif-js/exif-js: JavaScript library for reading EXIF image metadata

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [August 13, 2021, 1:16am UTC](https://community.glideapps.com/t/agent-for-information/29981/50 "2021-08-13T01:16:35Z")

</div>

Are you serious?

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [August 13, 2021, 1:17am UTC](https://community.glideapps.com/t/agent-for-information/29981/51 "2021-08-13T01:17:47Z")

</div>

Hey Manu, I looked at that specific thing, but it’s over a 1000 lines of code, and it’s too much for a little understanding of js

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 13, 2021, 1:24am UTC](https://community.glideapps.com/t/agent-for-information/29981/52 "2021-08-13T01:24:52Z")

</div>

Yes.  
For the Covessa app, the images are stored on GDrive. Here is the entire routine that I use for extracting the image metadata:

```auto
function get_image_metadata(id) {
  var file = Drive.Files.get(id);
  var metadata = file.imageMediaMetadata;
  return metadata ? metadata : {};
}

```

See [Files &nbsp;|&nbsp; Google Drive API &nbsp;|&nbsp; Google Developers](https://developers.google.com/drive/api/v2/reference/files)

---

<div class="post-metadata">

**Author:** ![PabloMFalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablomfalero/32/31166_2.png) [@PabloMFalero](https://community.glideapps.com/u/PabloMFalero)\
**Post date:** [August 13, 2021, 1:36am UTC](https://community.glideapps.com/t/agent-for-information/29981/53 "2021-08-13T01:36:51Z")

</div>

He showed me the integromat scenario that you created, which I guess is what you are mentioning. I’ll try to put your script in the yc column

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 31, 2021, 4:17am UTC](https://community.glideapps.com/t/agent-for-information/29981/54 "2021-08-31T04:17:17Z")

</div>

Update,  
I added the language used by the browser.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/d/bd4a7fbc284186657d9a0b2edf3ae5f05b5b579b.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 31, 2021, 5:15am UTC](https://community.glideapps.com/t/agent-for-information/29981/55 "2021-08-31T05:15:22Z")

</div>

you are the best… already using that!

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 31, 2021, 5:17am UTC](https://community.glideapps.com/t/agent-for-information/29981/56 "2021-08-31T05:17:12Z")

</div>

Yes I use it to define the date format and for the translation

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [August 31, 2021, 5:24am UTC](https://community.glideapps.com/t/agent-for-information/29981/57 "2021-08-31T05:24:03Z")

</div>

I’m using it to translate my apps for users… time format might be tricky for big countries with many time zones

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [August 31, 2021, 5:26pm UTC](https://community.glideapps.com/t/agent-for-information/29981/58 "2021-08-31T17:26:49Z")

</div>

Hola Manu,

I have been working and improving my codes base on date format (sorting arrays) and this map and info were very useful to me.

> **[Date format by country](https://en.m.wikipedia.org/wiki/Date_format_by_country)**
>
> The legal and cultural expectations for date and time representation vary between countries, and it is important to be aware of the forms of all-numeric calendar dates used in a particular country to know what date is intended.
> Writers have traditionally written abbreviated dates according to their local custom, creating all-numeric equivalents to day–month formats such as "30 August 2021" (30/08/21, 30/08/2021, 30-08-2021 or 30.08.2021) and month–day formats such as "August 30, 2021" (08/30/21 ...

Try to use the browser’s language is a good point and tool but I think that working with Endianness order is the final solution to date format sorting.

B – big-endian (year, month, day), e.g. 2016-04-22 // 2016.04.22 // 2016/04/22  
L – little-endian (day, month, year), e.g. 22.04.2016 // 22-04-2016  
M – middle-endian (month, day, year), e.g. 04/22/2016

Saludos!

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 31, 2021, 5:32pm UTC](https://community.glideapps.com/t/agent-for-information/29981/59 "2021-08-31T17:32:04Z")

</div>

Hi, Thank you for the information. I published a script on the topic of dates.  
The idea is to convert the glide date (whatever the language and format) into a JS date to be able to easily sort or compare.

> [@Date Hell](https://community.glideapps.com/t/date-hell/31031/6):
>
> I share with you the code I made to test the Glide \<-\> JS conversion. There are 2 two scripts: for a Date column for an Array Split (depends on the 1st script) The idea is to come and go and confirm the conversion. Script 1, Date Column Test YC [https://Date-Test.manun2.repl.co](https://Date-Test.manun2.repl.co) Source [https://replit.com/@ManuN2/Date-Test?v=1](https://replit.com/@ManuN2/Date-Test?v=1) Script 2, Array Test YC [https://Date-Test-Array.manun2.repl.co](https://Date-Test-Array.manun2.repl.co) Source : [https://replit.com/@ManuN2/Date-Test-Array?v=1](https://replit.com/@ManuN2/Date-Test-Array?v=1) Please give me a feedb…

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [August 31, 2021, 5:41pm UTC](https://community.glideapps.com/t/agent-for-information/29981/60 "2021-08-31T17:41:21Z")

</div>

Yes I know, I shared my own code in that thread as well 🤣

Now I have a new version able to sort any date array if the user has the following format:  
1- mm/dd/yyyy  
2- dd/mm/yyyy  
3- dd-mm-yyyy  
4- dd.mm.yyyy

I haven’t included other formats (e.g. yyyy-mm-dd) in order to not complicated the code but if I have to do it, I would use the Endianness code (B/M/L) to know the right date format used by user.

Feliz día

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [August 31, 2021, 7:23pm UTC](https://community.glideapps.com/t/agent-for-information/29981/61 "2021-08-31T19:23:03Z")

</div>

I mean…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/1/31d0d750d6e644c59d86559504836d8cf26c617f.png)

```auto
let f = s=>['B','L','M'].map((v,i)=>
  [b<13&c<32,b<13&a<32,a<13][i]?v+'':'',[a,b,c]=s.split`/`).join``

return(f(p5))  

```

In my case, all my date values are **L – Little-endian** therefore, my current date format is **dd/mm/yyyy** (day/month/year).

[Previous page](https://community.glideapps.com/t/agent-for-information/29981.md?page=2)

[Next page](https://community.glideapps.com/t/agent-for-information/29981.md?page=4)
